There are two different legal regimes at play: property law and contract law. You can put whatever you want in a contract, and if the buyer breaches the contract you can sue them for breach. But as a general matter, there are no "self help" remedies for breach of contract. Remedies like repossession are the domain of property law. You can leverage property-law interests in a contract (
e.g. providing in a contract that buyer retains title property until payment for goods), but as a general matter you can't mess with peoples' property to enforce a contract.
I'm not sure how Canadian law works, but in most U.S. states, an auto lender holds a lien, which is an encumbrance on your car title. Liens cease to exist when the debt obligation they are tied to is repaid. (Your lender will send you a letter or notice of satisfaction, but that is merely evidence of the fact that the lien has been extinguished.)
Because property law has its own mechanics, you can't just assume that the dealership can give itself arbitrary self-help rights in the contract. It's possible that the dealership has clever lawyers and set things up to allow it to lock out the car even after repayment. But it seems more likely that the dealership simply fucked up, and tried to collect a fee using a self-help remedy it was no longer entitled to use after repayment of the loan.