Before you go further, consider the cost to replace the Hg-vapor lamp with LED's. The data sheet for LED in your link states output power is ~4 to 7 mW. Specifications for a similar 36W lamp states its radiant output at 12 W, and this Osram lamp claims 10.8 W. To get the same amount of UV-C radiation would require 1,500 to 3,000 LED's.
That said, there might be a similar lamp that fits that socket at *far less than the OEM price.
As for using the ballast to get DC, that would not be practical. In the days of the magnetic ballast, some (newer) had three windings on the ballast transformer: two for filament power, which might be 12 VAC or so, and a third for ignition voltage, initially ~1,000 VAC, which drops to ~120 V on each arc (well, glow discharge) ignition. Others used a single resonant inductor/capacitor circuit to get those voltages. Your simple "adapter" would have to accommodate those voltage regimes.
However, an electronic ballast is far more complex, with circuits to switch voltage to filaments and across the glow discharge. These voltages would be continually changing.
It would be simpler and far more efficient to tap into the AC mains before the ballast.