It certainly is! Burning enough gas in a small engine to power a car is much more polluting than generating the same energy in a commercial-scale coal-power plant.
I'll say this as a person who used to work for an electric utility that generated MOST of its power via coal.
It is MUCH, MUCH easier to control pollution at a point-source (like, say, a power plant) than it is to control pollution on a moving platform.
If you only knew the kinds of engineering efforts that have been devised to make the gasoline engine more efficient and less polluting, you might consider how much better electricity generation via fossil fuels will get if we were really serious about having an energy policy in the US.
SO far, there isn't a mechanism known yet for generating energy from a concentrated source that doesn't involve some form of pollution. Coal, nuclear, solar all have their by-products.
Once you account for externalities, there are very very few options that look great.
It certainly is! Burning enough gas in a small engine to power a car is much more polluting than generating the same energy in a commercial-scale coal-power plant.