At most for $50k, so it would need to be a very cheap house. You can't borrow more than $50k or half of your 401k assets, whichever is lower.
You could take out for your down payment to avoid PMI, although I don't think that's what was being discussed in the example. (It wasn't worded so clearly to me though.)