Yes, it is absolutely necessary. AT&T still owns the phone and they cannot let you steal it.
However, if you find an agent willing to work with you, you can pay your phone off and still continue to receive the trade in credit for the remainder of the deal; this is what I did. The in-store agent made sure to call AT&T support and "notarize" (not sure if this is the correct term) the credit so that it would not disappear. After the 90 day minimum unlock period, I unlocked my phone (and it would have worked if there was not some probably-unrelated internal issue with AT&T, that is another story). So it is "possible" if you are willing to be paid back from AT&T over the course of the remaining months for the phone.