It depends on a few factors.
Typically, what happens post-lease is that the inspection will help determine whether the vehicle is of the correct 'quality' to be Certified Pre-Owned (i.e. sufficient quality or fixing whatever's wrong and selling as CPO is worth doing) and that's kinda the first decision gate.
After that, I would assume that the dealer getting the lease back has some pull as to whether they keep it, but that might be contingent on a few factors like what your agreement with the leasing company is and what your current floorplan is like. (Many dealers in the US don't own most of the inventory on their lots, so any car you keep on your lot eats into that line of credit.)
Oh, also the agreements between the financing companies and the auctions themselves. In some cases the agreements are extremely tight, and there are only small windows where someone doesn't already have the 'rights' to sell a vehicle. (That was a fun project.)