If its in pre-foreclosure and the owner is selling himself, then you enough time to think further. Even if they get an offer tomorrow, it will take a month or more to get it approved (if its a good offer price) and then a month to close the escrow. So, it would be your choice:
1. You can ask your owner to give you a month notice before the closing of the sale
2. You can wait until they get any offer to look for another house with a month notice
3. Start looking for a different house now
4. You can ask the new owner, if they are investors and looking for renters after the close of sale. In this case, you can stay.