It very much depends on the UPS. Most UPSes, particularly under-desk form factor ones for home and small office use do not include power conditioning or filtering.
A simplified topology of a common UPS design looks a bit like this:

The AC usually flows directly from the AC IN to AC OUT, and the controller leaves the right hand side of the transformer unloaded. When the power fails, the controller senses that the input power is no longer present and starts producing an AC power source from the battery, which is stepped up by the transformer to take over the supply. The diagram above is heavily simplified but it gets the point across - when the regular AC power is present it's just like running the device straight from the wall socket.
There is another type of UPS design which includes a feature called power conditioning. These UPSes are usually very expensive and tend to be found in rack mount form factors rather than desktop units. Power conditioning UPSes usually include additional filtering in the form of an LC circuit (large toroidal inductor plus a large capacitor array) which acts like a low-pass on the power signal to remove noise and improve power factor. Depending on the characteristics of the filter, this may prevent power analysis side-channel attacks such as the one you described.
Yet another type of UPS is a DC UPS. These are usually used in specialist datacenter applications where it is more power-efficient (and sometimes heat-efficient) to have one large integrated UPS and switching DC power supply solution that provides a DC rail (usually 48V) to all systems in the datacenter, rather than each server switching down from mains AC to the required board-level voltages. Such a design would likely filter out power noise from the servers, thus preventing a side-channel attack, although in most situations you would expect the main UPS to be fed by 3-phase at higher-than-domestic voltage, thus making any direct interface with that power rail extremely dangerous, which is a pretty good deterrent.