All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
In general, rent contracts which end with ownership are invalid even though some of them may be valid. They are valid when there are two different and distinct contracts with a time interval between them, in a way that the sale contract is concluded after the rent contract. Or when there is a promise of ownership at the end of the rent period. For more benefit, please refer to Fatwa 81863.
Since the person renting the car does not own it until now –as we understand from the question –then it is not Islamically permissible for him to sell it to you because he does not own it; among the conditions of sale is that the seller must own what he sells.
Therefore, it is permissible for you to buy this car from the bank which owns it provided you buy it with a correct sale contract because the bank renting the car does not prevent from selling it, as stated by Al-Buhooti from the Hanbali School of jurisprudence. This is the view of the majority of the scholars .
However, some other scholars are of the view that selling the rented property is valid, but it is dependent on the acceptance of the renter as he has right in it (by renting it) provided he is not harmed. Therefore, if the renter agrees to the sale contract, it becomes valid, and the rent agreement becomes void, but if he does not agree then the sale is void; this is the view of the Hanafi School of jurisprudence.