You should install a carbon monoxide detector regardless of what the code says!
Carbon monoxide is a toxic gas, but, being colorless, odorless, tasteless, and initially non-irritating, it is very difficult for people to detect.
The initial symptoms of acute carbon monoxide poisoning include headache, nausea, malaise, and fatigue. These symptoms are often mistaken for a virus such as influenza or other illnesses such as food poisoning or gastroenteritis. ... Increasing exposure produces cardiac abnormalities including fast heart rate, low blood pressure, and cardiac arrhythmia; central nervous system symptoms include delirium, hallucinations, dizziness, unsteady gait, confusion, seizures, central nervous system depression, unconsciousness, respiratory arrest, and death.
Detectors are cheap ($15-$60) and readily available. They come as battery-operated, plug-in, and as combination smoke/CO detectors. I recently replaced the smoke detectors in my house (which were 10 years old and thus at end-of-life) with these combo hardwired units: they are linked, so if one goes off, they all do, and announce "Fire" or "Carbon monoxide".
Bottom line: If you have a fuel-burning appliance (furnace, stove, etc), fireplace, or attached garage, you should have at least one CO detector.
As far as current compliance, the IRC and local building codes typically only apply to new construction or renovation. For example, if you are doing an addition to your house or other type of permit-requiring renovation, you'll have to comply with the building codes for at least that portion. This may vary by jurisdiction, and there may be other specific laws or regulations that require retroactively complying with the codes. I am just a random person on the internet; you should consult with your local permit office and/or building inspector to know for sure.
Your insurance or mortgage company may also have other requirements, on top of local building codes and law.
Law in US
Since July 1, 2009, Colorado requires CO detectors in all new homes and any re-sold homes.
Since Feb 22, 2010, New York state requires at least one CO detector on the lowest story having a sleeping area. Homes built after Jan 1, 2008 must have a hardwired CO alarm.
Since Jan 1, 2011, California requires CO alarms for new homes, and since July 1, 2011 for existing homes.
Law in Canada
In Ontario, homes built after Aug 6, 2011 must have hardwired CO detectors installed. Legislation was passed in Nov 2013 to require CO detectors in all homes with fuel-burning appliances.