Told by whom? An attorney? I would check with an attorney. You may also find some guidance here:
Legally the home belongs to the owner, even if they are in default, and generally they can do with it as they please, including renting it out. Some States have enacted protections for tenants and there are even Federal laws now that also provide some level of protection. Mostly, though, the protection is from the bank trying to evict tenants for no reason.
Check on line to see if your State has any regulations in this regard, you could try your State office of Community Affairs. Also consult with an attorney.