What you're describing is fairly common with dealerships. The dealer wants to try to find a lender that will give the dealer a better percentage of the financing agreement. Whether or not this is actually lawful depends on the terms of the contract. You need to have a lawyer review that contract in detail to try to determine if the dealer's attempt to switch you into a different lender is lawful.
You could tell the dealer that if the credit union won't accept the loan that you want to cancel the deal and you want your car back, or the cash value stated in the purchase contract. The dealer may say that you can't cancel. Whether or not you can will also require a detailed review of the contract.
In my experience, most car purchase agreements permit the dealer to use a different lender, on the same terms as would have been provided with your chosen lender. But, if the dealer cannot find a lender to take the deal, then the dealer can cancel and you will have to return the car. At which point, the dealer will try to avoid paying you for your car, if the car has already been auctioned to a third party, and cannot be returned.
If that happens, then you will have to demand your money, and if you're refused, you may have to contact law enforcement and report the matter as a criminal theft.
I hope I've answered your question. Please let me know if you require further clarification. And, please provide a positive feedback rating for my answer (click 3, 4 or 5 stars) -- otherwise, Justanswer retains your entire payment, and I receive nothing for my efforts in your behalf. Note: If you cannot find the rating button on your webpage, please just type in your rating in a res