Where can I use my blacklisted T-mobile phone (iPhone 5)?

Just bought a blacklisted iPhone 5 unaware. The phone is tied to a finance agreement with an outstanding balance and is blocked.

Anything I can do? Can it be flashed to AT&T or something?

A blacklisted phone will not work in USA even if is unlocked. If is unlocked will work in other countries.
If is currently still locked and blacklisted will not be able to unlock it, so will not be able to use it as phone anywhere, so basically have an iPod. Can try and call tmobile and maybe if you explain the situation may give you a solution