It is possible that a car can smell like gas when the heater is turned on for a few reasons. One possible reason that this happens could be a leak in the line.
yes
Leaking heater core
Depends on the smell. if it smells sweet, like antifreeze, then it is probably a leak in the heater core. This is a small radiator that runs from the main radiator and makes hot air for the heater. If it smells like gasoline, may be a gas leak. Do not drive the car, get it fixed by a professional. If it smells like smoke, it may be an oil leak. get it checked.
The engine has to be running and warmed up for the heater to produce hot air. So yes, you need gasoline to get heat from your car (unless you have an electric car).
It probably has a leak, possibly from the heater core.
There are several things that could be going on. The most common thing that would make your car smell like gas when the heater is on would be a bad heater core.
It could be a bad fuel pressure regulator.
i believe your heater core has died
Likely as not there is a coolant leak, perhaps in the heater core.
A car heater that smells like burning rubber could be an indication of a belt that is slipping. The slipping belt smell can be drawn in from the engine compartment into the passenger cabin.
If it is not actually over heating, then if the smell is outside the car, look for coolant leaks around the head and the thermostat cover. Inside the car could be a leaking heater coil.