This is possible in times of crisis.
Banks usually "make money", lending more than they actually have in cash. What happens in times of crisis is that everyone runs to take out cash at the same time, but doesn't have money for everyone. So the government forbids withdrawals of money.
That is why some people recommend that you have money at home for these times.
Exactly, because they don't have it. And you're right in times of crisis people prefer to hude their money under the mattress than in the bank