Jason - I think if you do any renovation that would require a permit then you would have to upgrade it to todays code. I'm not 100% on this and also have fire code questions.
I'm looking into doing a house hack where the egress window sills are 4" too high to meet todays code, can a step be built or would the foundation need to be cut into and lowered 4 inches and the windows replaced. Also in a house hack do you need to have a 2 hour fire separation between the units?
Is there a difference between fire codes for a "duplex" where the lot would be separated into two lots. Or an ADU or Mother in Law suite.
You should call the building department where the property is located and discuss it with them. Typically you don't have to retrofit a building for code changes until you do some other project. What I've ran into most commonly is that any sort of remodeling work that requires permits will require that you also install hardwired, interconnected smoke/CO detectors throughout the property. But until you do such a project, you're not required to install those detectors. You may still need smoke and CO detectors, but you don't have to do the hardwired, interconnected ones until you pull a permit. Egress windows and arc fault or ground fault breakers are another common upgrade as you're doing work under a permit. My guess would be that you don't have to do an upgrade like this unless you pull a permit.
But, some locales do require new certificates of occupancy on ownership changes. If that's the case you might have to fix this and do other work as part of the purchase. Only way to know for sure is to talk to the building department.