If I didn't pay off my iPhone can I switch to another carrier?

I got the iPhone 5c a few months ago from at&t. I didn't pay for it in full. I was making montly payments on it. Now I didn't pay my bill and I'm trying to unlock it to switch to straight talk but someone is telling me since I didn't pay off the phone that it will only work for a few days? Is this true? Is this true it's confusing? Cuz say I did pay for the phone in full then why would I need to pay to have it inlocked? I should be able to switch to whatever company I want.

Please answer?

Once your phone is unlocked its unlocked. The only thing AT&T is going to do is bill for the remainder of the phone/contract. T-mobile will pay that off if you switch to them.

They will come after you to collect the money especially since you didn't buy the phone outright. Bad idea on your part.