If an ESC is rated for a specific voltage or range of voltages, it is not usually a good idea to go outside of that range – but the voltage stated is usually the nominal voltage of the battery it is intended for. If headed for the upper limit, though, it is always a good idea to ask first.
24 volts is a nominal voltage for lead acid batteries, so the ESC should be OK since the rating on the label should indicate the appropriate nominal battery is is intended for, but asking should either give an informative answer or tell you what you need to know about their customer service.