You have to comply or face the consequences. It does not matter that the unlawful addition was added by someone else and you inherited the home: the current owner of a home is responsible for ensuring that it is code compliant. So just as if you'd bought a house with an illegal addition, you'd have to bring it into compliance, so, too, do you have to bring the house you inherited into compliance.