If it's a loan for a car, then as long as the bank continues to be repaid, they won't either be aware that you sold it or necessarily care. The car is your property and can't be repossessed even if you were to default on the loan.
On the other hand, if it was a hire purchase agreement, you don't have title to the car until the final instalment is made and it is not yours to sell, therefore, until this point.