A central bank is not incidentally called a lender of last resort. I intentionally stressed 'last' here which means there are other lenders that a bank can appeal for help to. In case there is a bank-run, the bank can either directly borrow insufficient funds from other banks through interbank market or sell its loans (probably with discount) to anyone willing to buy them (usually other banks or the government) to fill a cash gap (cash deficiency). In either case, there is no money printing...
They can't borrow from other banks if the other banks are all experiencing bank runs too.
As far as selling its loans at a discount, you seem to be contemplating bankruptcy. Yes, when pretty much everyone goes bankrupt that would solve the problem.
Also, we can't forbid banks from lending more than they have since they just can't lend more than they actually have. If you think otherwise, I'm all ears!
A bank is able to loan money into your checking account even though they don't actually have any physical dollars to back it up. They're forbidden from doing so, so they have to take the roundabout route described by myself and Wikipedia and that video I linked to, but it's possible for them to just directly credit people's accounts with money that doesn't exist physically.
Were you able to watch the video I linked to?