Many of us do probably think that it is a misuse of an old good IC to let it directly be connected to a speaker, but as that was the question, if it was possible:
Yes, it is possible but an poor design. Think about as if an turtle can tow an Ferrari. Under good condition is it possible but an misuse of both the turtle and the car.
TS want to use comparator mode, and I guess simplest possible construction: single power supply, no speaker decoupling. Under these circumstances will max sound power be ~10 mW at 40 mA. If a serial cap is added is it FvM's numbers that are correct. Not impressive in any case, but audible. It is a good idea to design such that without input signal, let 741 output DC level rest at 0 Volt output, which reduces current consumption if speaker also is connected to ground. This circuit will be enough for simple beeping square-waves.
Just as an example that it still with this simple circuit is possible to play analog sound with decent quality can PWM be used. For PWM do it need that signal source can deliver PWM or that an digital hysteresis inverter is added in serial with analog signal as a modulator (technology level KISS).