The simple, non-legal-advice answer here is "no". An extended answer would be "heck, no!"
Is it LEGAL for you to rent a home in the midst of foreclosure? Sure- you'd be doing nothing illegal. Is it legal for the owner to rent it to you? Again, the answer is in the affirmative. After all, the home's owner remains its owner unless and until the gavel falls at an actual foreclosure sale- and they can do with their place as they wish.
Is it ETHICAL for the owner to rent it to you? Perhaps, with a caveat: if they've fully disclosed the status of the home and you choose to rent it anyway, you assume the burden of having made a poor decision. What you CAN'T worry about is whether you're paying the owner rent with them not paying the mortgage. The lease that both of you share, the rent that YOU owe, and the mortgage that is HIS responsibility can't be mixed together. You simply have to decide whether you'd like to roll the dice and ride things out.
In deciding, weigh the fact that you WON'T be afforded any protections under the Protecting Tenants at Foreclosure Act of 2009. This law gives those in bona fide leases prior to the commencement of foreclosure proceedings certain protections- but entering into a lease for a property already in foreclosure could potentially leave you (literally) out in the cold.
I won't lease out a place that's in foreclosure, and I'll give up management of properties falling into foreclosure in the middle of a lease term at said lease's expiration rather than renew a tenant under the weight and uncertainty that the foreclosure process brings- and won't look to acquire a new, unprotected tenant. It's simply the right thing to do.
If considering renting AT ALL, I advise everyone to learn who owns the property they're interested in. Here in Florida, one can visit the local property appraiser's site and get their names. With names in hand, visit the Clerk of the Court's website for the county the property sits in, and search for any legal proceedings against the owners. You're looking for the filing of a "lis pendens" (typically coded with an "LP") that signifies the beginnings of foreclosure.
Choose wisely, and be prepared to accept the consequences of your choices should you make unwise ones.
Hope this helps some folks. Feel free to contact me with any questions you might have.