Of course you would give notice to the buyer that there is a default of the car loan in effect. To not give notice to the buyer would constitute fraud. You must be able to pass clear title to the buyer. If there is a car loan in effect the lender must have possession of the title.
The buyer should contact the lender for a payoff figure and to arrange to have the loan paid off in order to receive CLEAR TITLE on the vehicle. You may not receive any of the proceeds of the sale if you owe the bank as much as the price the buyer is willing to pay.