Plenty of retirees rent. It may even make financial sense in your area to rent.
Typically, if you plan to stay in one place for a very long time, it's less expensive to buy than to rent. In your case, it might make sense to buy a duplex where one of halves is a good fit for you to live, and rent out the other half.
However, it wouldn't make sense to buy a house and have your entire down payment come from a 401k loan. How much are you currently saving? If you're saving enough that you'd have a 20% of down payment well before you plan on retiring, that's something you may want to look into.