Comparator, inverting/non-inverting terminal voltage is more than supply voltage
It's a comparator, not an op-amp. The question does not arise with op-amps because they generally do not have open drain outputs.

The answer is maybe. You will have to read the datasheet for the particular comparator (assuming it has open drain/open collector output).

In the case of the LM339 the maximum output voltage is 36V regardless of Vcc.

Some comparators may have protection diodes on the output, so the datasheet would likely state a maximum such as Vcc+0.3V.