Yes, it should be a computer UPS. I am sure that APC UPS output a pure sine wave as an alternating voltage source. If you have a different UPS manufacturer, you can check this by looking at the UPS manual.
The voltage regulator will not synthesize a pure sine wave, so it will not work in our case.
The operating principle of the UPS is not as you described (charge and use until discharged).
It's simple - the UPS is connected to your home electrical network. While your home network is in order, the UPS charges its internal battery and outputs a pure sine wave to power your computer or a device sensitive to the quality of power. As soon as your home network starts to surge or the electricity goes out completely, the UPS switches to using its internal battery and your computer continues to work without noticing this switch. at the same time, the UPS monitors the state of your home power network and as soon as it is normalized, it switches to it (at the same time replenishing the charge in the battery, which it spent during the period of absence of external electricity). This is a fairly expensive device to buy it just to check the lamp, I just suggested such a check if you already have it. it is often used in houses with problems in the electrical network to which stationary computers are connected.