I am guessing that you are speaking about a SHORT SALE that you have placed an offer on and the bank is asking for more money. The answer is YES, the bank can raise the price due to the fact that all short sale terms are "Subject To", Bank Approval. This means that the seller/owner, who is still on title and who signed and accepted your offer is only submitting your offer to the bank for final approval. When the price is lower than market value the bank will often ask for more money in the form of a counter offer.
So yes, it is legal in this instance. Remember that price is not only negotiating factor, length of escrow and inspection contingencies, loan contingencies, are all negotiation factors in an offer!