You have to know your UPS design/limits.. Home/consumer level UPSs do not lend themselves to what you want to do..
In addition to caveats mentioned above, some low end UPS use only a small slab of aluminum (and with no air flow) to sink heat from the main inverter power transistors. This is adequate only for its intended limited time.
Irrespective of how much power is left in the battery, the UPS microprocessor then shuts the unit off after a given amount of run time.. Typically these systems were designed to run only long enough to allow an orderly shut down of the attached computer system. Also in some of these, the inverter circuit floats the battery up to around 50 volts above ground.
Now if you have a commercial UPS system designed for additional/external battery packs, it a different ball game.