Assume a bank is a customer of another bank and has $1MM on deposit in a DDA.

Can that bank pledge the balance in that DDA to the other bank to secure a $1MM loan back to that bank?

I know a non-bank customer could do that, but am not sure whether there is any regulation that would keep a bank from pledging cash in this way.