You're meant to.
In fact, in older cars, it was automatic when redirecting air to the window defroster. On this GM control, the far right position would activate the A/C compressor.
Almost always, it is a cold, wet day, and you have both sliders all the way to the right. The pass across the activated A/C coils dries out the air, because of the way humidity works. So your window glass is immediately hit with dry air, and there is no need to wait for heat to become available.
Later, as the engine warms up, the heater coil becomes effective, and now you are getting air that is pre-dried and then heated, which dries the air further. This dryness, moreso than the heat, defogs all your car's windows.
Humidity and the battle for your windows
The way humidity works is that warm air can hold quite a bit more water than cold air. That's why they talk about "relative humidity" instead of absolute humidity in terms of comfort. So if you have 10C/50F air, it won't have a ton of water to begin with, but if you chill it to 1c/34F, the water that's in it will condense out, and it will have almost no water.
To the 50F/10C windshield, it will seem like very dry air, and the condensate on the windshield will evaporate into it. When you also start heating the air to 21C/70F, it is much drier still, and is even more effective on the windshield you are blasting.
However, keeping condensation off the other windows is harder. Cars are poorly insulated and the temperature of the side windows will not rise much above outside temp. So if it's 50F outside, your air inside the car needs to be dry enough to be non-condensing (less than fully humid) at 50F. Outside air coming into the car is fully humid at that temperature, so it's no help at all. The A/C system is your secret weapon.
Having driven cars without A/C, it is much more of a battle to keep windows clear when you do not have A/C available. It is not realistically going to happen until the car warms up, and even then you need heat blasted at full all the time, as raising the window temperature above the condensing point is your only defense.
So if you have been struggling like that because it never occurred to you to click A/C on... Try it.
The A/C cannot function in too-cold conditions because the coils will freeze up. But if outside air is at freezing, it doesn't have much absolute humidity anyway, so drying it won't help much.