Go talk to an attorney who is experienced in both real estate law in general and landlord/tenant laws. The rent to own issue is a standard breach of contract claim. If the rent to own contract wasi in writing, there is a possibility that recording the lease with the county recorder could make the contract enforceable against the bank after it forecloses. This is a big "maybe" depending on certain other facts that may or may not be present in your case.
As to whether you should pay rent, I would be surprised if anyone on here would give you that kind of advice. It could potentially open up a lawyer to liability if you acted on that advice. Go talk to someone in person who can give you a comprehensive evaluation of your case and give you all of your options. Any answer you obtain here is going to be insufficient for your purposes.
The legal owner of the property can collect rent while they 'own' the property. You may be thinking of 'rent skimmining' -where the landlord collects rent but does not pay the Lender. Civil Code 890....applies during the first year of ownership in most cases.
If you pay and he-current owner- is unable to complete his promise in your 'rent to own' agreement/contract, due to the foreclosure; your action is in Breach of Contract...you may want to go to the county recorder's office to find out who your new owner is going to be and when...'trustee's sale'...if the Bank take the property as REO or no other bidders.
These are some of the options that talking directly to an attorney make available to you.