Withdrawing a paper during peer-review or (worse) during the production after acceptance, but before publication, is an uncommon event and not considered good scientific practice, and must be done only in exceptional cases.
I think a manuscript can be withdrawn from any journal at any time (often before acceptance) discussing with the editor. However, the authors need to provide justification for that. Further, consulting the specific journal policies is important.
If the article is not accepted then you can withdraw the article during review process. But do send the proper mail saying about withdrawal so you can send to other journal