The only way to know if your water heater is emitting carbon monoxide is to install a carbon monoxide detect near the water heater.
If your water heater is emitting carbon monoxide it will sound an alarm when it detects a leak of carbon monoxide.
Carbon monoxide is very dangerous and does not have any smell and can put you sleep and even kill you.
Carbon monoxide is a silent killer as without a carbon monoxide detector you can't tell if your water heater or other gas appliance is emitting carbon monoxide.
If your water heater is electric then it does not emit any carbon monoxide.
Propane and natural gas water heaters do emit carbon monoxide that has to be properly vented to the outside.
Check or have the vent to the water heater checked to ensure that it's not obstructed and ensure the vent to the water heater or other gas appliance is in tact and vented properly.
Carbon monoxide detectors should be installed in your home even in other areas as well to alert you to possible carbon monoxide.
If the carbon monoxide detector sounds an alarm then you have carbon monoxide present in the area and house and you should vent the house and get out and get any pets and children out and call 911.
Another sign of carbon monoxide being emitted in your home is dark staining or soot around your gas appliances or on the walls and ceilings.
Or if the water heater or gas appliance is burning with orange flames or yellow flames instead of blue flames then it indicates improper and incomplete combustion and can be putting out carbon monoxide.