Legal for him to tell her? Certainly.
Legal for him to take any action if you come on the property (including common areas), to visit her after being told to stay off? Quite probably.
Take action against your parents (eviction) for violating his rules in that matter. Also quite probably.

