Legal? I can't say, common yes. Banks are looking to avoid any costs they can on short sales and agents buying one for their own use have run into this. Banks also try and cut back commissions when agents are on both sides of a transaction.
A Buyer can not be a realtor receiving commission.
You can not list your own house or a relatives.
This is NOT arms length~
So, yes, the bank can refuse to pay commissions
Debbie Albert, Keller Williams Treasure Coast
Hope this helps