MLB has no salary cap. The Yankees can spend whatever they want to spend, provided they're willing to pay the luxury tax (which they always do). It certainly is wasteful to pay $20 mil a year to a guy who's not even on your team anymore, but that's what they're going to have to do in order to move him. No team would take on the whole contract. And at this point I think they pretty much have to move him. Can't see any way that relationship gets repaired, and if they keep him around he'll be a distraction. Better for the Yanks to move him and at least get some return/ salary relief while he still has value.
Of course, A-Rod has 10/5 rights, so he can block a trade if he wants. Should be a fun offseason in NY.