Absolutely...but understand that all these costs come out of the proceeds paid to the bank and not the seller themselves. So the bank might turn it town. I've seen it both ways...but either way, make sure you get one, especially if you are buying the home as-is so you can protect yourself against unexpected repairs.
in my dealings with a short sale the bank has NEVER agreed to pay for a home warranty. But you never know and i would at least ask and let the bank make the descison if the price warrants it or not.