Gas-fired water heater safe to have in living area of home?
As long as the gas appliance is vented properly, it is not a CO hazard. Venting is vital to ensure combustion products (i.e., CO) do not remain in the living space. If you are in doubt, get the water heater checked by a professional.

Carbon monoxide detectors are also required by code - one on each floor and outside each set of bedrooms. But, perhaps counter-intuitively, do not place a CO detector close to the water heater (or any other gas appliance); doing so can lead to false positive readings / alarms.