In most cases, Yes.
Banks typically do not have firewall lists where a customer can choose who can (and cannot) deposit money into their account.
One of the core points of banking is payments, and the ability to make payments to anyone. As long as you have the account details, you can pretty much transfer/deposit money into that account.