Yeah, magnetic ballasts are fine on modified sine wave inverters. If running one on such an inverter long-term, lamp life might be slightly shortened from the rougher waveform, but I don't know for sure.
I would, however, try to refrain from running electronic ballasts on them. I imagine those are far less tolerant.
Well, the fact some ballasts seemed to work well could be just luck. Either it haven't fried anything, or the ballasts were of a more tolerant type.
The "modified sinewave" is designed to have the same rms voltage and peak voltages as the real sinewave, while sufficing with just switches in the output stage. That means three things:
- The peak voltage is the same, so the electronic ballasts have no reason "to complain" at all. In fact those UPS inverters are actually designed to operate mainly the rectifier load (all the computers are like that), so actually the electronic ballasts are the type of load these inverters are primarily designed for.
- The magnetic saturation in a magnetic device like transformer is about 10% lower than on the real sinewave. With the regular mains transformer with the rectifier on it's secondary (most low power electronic), that is no problem, the transformer just has more margin towards saturation. But with a lag ballast (series choke, HX autotransformer,...) that means 10% lower magnetic flux, so more than 10% lower lamp current. Fluorescents usually tolerate that well, HID's will run cooler than designed.
- The waveform has sharp edges, what means quite severe problems with circuits, that contains significant capacitors on the AC circuit (so several uF and above; not just the EMC filters of few 100's nF).
Directly connected PFC or similar capacitors (uF's across the mains input) would most likely fry the inverter inside of the UPS (or the transformer).
Auxiliary capacitive dropper circuits (LED's, DC supply sources for photo or movement detectors or cimilar small electronic devices) would get fried by the high peak currents
Circuits with capacitors inside some "out of resonance" LC circuits, like CWA or any other lead ballast, will form rather high 3'rd harmonic content in the currents, with the ability to either cause higher than designed load currents or cause an erratic behavior (multiple current zero crosses at wrong phases may cause difficulties with arc reignitions after that)