If you never had a written lease agreement then the period of your tenancy is determined by the frequency in which rent is due. Since most people pay rent every month, you probably have a month-to-month tenancy. In such a tenancy the landlord (or the tenant) can terminate the tenancy by giving one month's notice. It does not matter what the landlord's reasoning is (as long as it's nondiscriminatory and non-retaliatory). One of the benefits of a month-to-month lease instead of a longer lease is that it is easier to get out of if you want to leave. However, it is also easier for the landlord to terminate. If you actually had a lease for a longer term then you would be entitled to remain in the house until the end of the lease or the end of the redemption period. Also, please note that just because the property is in foreclosure does not mean that the tenant can discontinue making rent payments.
DISCLAIMER: This answer is provided as general information, which may not be appropriate for the specific facts of your particular situation. No attorney-client relationship has been established based on this limited communication. You are advised to consult with an attorney in your jurisdiction before taking any action or inaction that may affect your legal rights.