Of course you can trade it in. This is America, you can do anything you want as long as you are willing to pay for it.
Here's how it works.
When a dealer makes you a trade in offer then are basically offering to buy the car from you. The money they offer you MUST go directly to the bank to pay off that remaining loan balance. If there is money left over you can use that as a down payment. If the money they offer you does not cover the entire loan balance then you must pay the remaining balance out of your pocket.
There are two very important numbers that you must be able to manage in order for this deal to work.
You need to know your loan balance. This number is fixed, you can't change it.
You need to know what your car is worth on the open market. This number you have some control over since you can do things to the car to make it more valueable. You can go to different dealers looking for a better offer or you can sell it yourself and get more money for it.
Your task is to reduce or eliminate the difference between what you owe on the car and what someone is willing to give you for it. if you can't do that then you will lose money on the deal.
In the end your loan must be paid off in order to sell or trade in your car. If the buyer doesn't pay it off then you have to. There is no deal until that title is in your hands and you don't get the title until the loan is closed.