Yes, that is the other option. However, I would use a 3.0V zener diode instead of a 3.3V one. That way, a small intolerance in the value won't put too much voltage into the MCU. 3.0V is enough to be seen as a logic high with a 3.3V MCU.
Be aware though that zener diodes this low (including 3.3V) are not 'ideal' devices and at low current their performance is quite variable. Check the datasheet carefully for the diode that you have in mind. I would suggest giving it a good few mA of current, perhaps 10mA, set at the 24V. So, that would be a series resistor of (21/0.01)= 2.1K (so pick 2K or 2.2K from the E24 range).