Interesting situation. Unfortunately, based on the limited facts you have presented here, only a real estate attorney in your area will be able to give an answer with any meaning. I will say, in most jurisdictions, the bank would have no right to change the locks and evict you until AFTER the foreclosure process.
Jack Gillis, M.B.A., J.D.
Jack Gillis Realty Advisors
Nathan Grace Real Estate, Broker
5619 Dyer Street | Suite 100
Dallas, TX 75206