The short answer is yes.
The real question you should be asking is whether or not it is a good idea.
You can't sell, or trade, a vehicle unless you have a clear titlea clear title meaning a title that is lien free. Refinancing what you still owe on the old loan will give you the clear title, but with the burden of greater debt
It doesn't matter so much if your old car is worth more than its loan. What the dealer will do is they will determine the old car's trade-in value, pay off your lender for however much you still owe, and then apply what's left towards your new purchase. Pretty straight forward.
The problem arises when you are upside-down on your loanbasically when your car is worth less than the remaining money on your loan. This happens quite frequently unless you paid an unusually large down payment for your old car. The first few years are when the car depreciates most quickly. If your down payment wasn't large enough, and you've owned the car for two or three years, then your old car is probably worth less than its existing loan.
What happens then is if you have average to solid credit, the dealer will contact its financing office to pay off the remainder of your existing loan, and then they will roll over the debt to your new loan. If your credit rating is poor, then the dealer may require a small sized down paymentperhaps $500 or so.
Stacking old debt onto new debt isn't something unusual, and dealers have been doing this for years. Obviously rolling over debt is not something you want to do often; and of course, you're not going to get away without paying the amount remaining in your old loan. That would be a pipe dream.
If your main concern is being screwed over in the process, then put yourself at ease. Unless you are dealing with a scammer, most dealers aren't going to find ways to slap you with more old debt.