The only way is to find out through public records if it has been foreclosed or in preforeclosure. This is not available to everyone and is not an exact science.
However, if it is on the market with a Realtor, you have a better shot. You can also ask a Realtor to help you find something and ask them to look up in public records. However, the minute you sign the lease and move in, the bank could foreclose, you don't know.
Renting is a leap of faith on both sides of the coin. Unfortunately, this is happening to people. The only way you can be sure is to get out of the rental game and buy.
You need to keep paying legally, if you are living there, or the bank or landlord could have you evicted. You don't want that on your record. You are living there, so you should pay, but you need to find somewhere else to live. You can ask the bank or the landlord about time, but you may not get an accurate answer. Typically in these situations, the landlord knows months in advance or at least 30 days. If the sheriff serves the foreclosure papers or posts, you will be given the time frame.
I wouldn't wait. You want to have time to find something you like. Being under the gun on time never produces the best results. Good luck.