Until foreclosure goes through, the person you are currently renting from owns the property. Your rental contract is with this person, not the holder of the second paper.
The owner of the second paper has to go through the process and become the owner before the rent can be legally demanded by them. The holder of the second paper as a contract with the purchaser, but not you. The two of them have to work it out, and you should presently be paying the ‘owner’ not the second.
You may want to warn the second that demanding payment direct from you as well as taking any action against you before their foreclosure completes.. is illegal(They have a lien against the property, but don’t own it). Taking action against you for not paying the second before the forclosure is also illegal. Any attempt for the second to collect directly against you under threat of eviction is considered extortion.
You may also want to mention to the holder of the second, that they should work it out with the owner and not involve you. The second should mention to the owner that the second is a recourse loan, meaning that the holder of the second can go after other assets of the owner after foreclosure for the balance or deficit. The holder of the second may want to work out a signed agreement with the owner (signed by both) that the second gives up the right to pursue for any deficit in return for having the rent assigned and payed directly to the holder of the second while the property is going through the foreclosure process.
NOTE: I am assuming that the ‘assignment of rent’ was only signed by the second
Once foreclosure completes, the second can not go after you for any payments made to the owner prior to foreclosure.
I think the holder of the second paper was trying to ‘shortcut’ the process.
And don’t short the rent like you did.. not a good idea. The owner can evict you for this, but not the holder of the second paper.