Your going to laugh, but this actually happens quite often and is very easy to put into effect. First, you and your friend need to draw an agreement - nothing elaborate, even hand-written if you want. It will just specify the amount of the loan and any terms, suc has payments, if any. Then you need to sigjn an MV1 form from the DMV and your friend will file these with the DMV and then hold the car as collateral until you pay him off.
And yes, any financial institution will respect his payoff because it's legitimate and they can't be in first lien position unless he releases the lien. If you don't agree with the payoff - refer back to the agreement.
It's an easy transaction and the DMV won't have a problem with it.
Buy the car !