Yes, the pump can be connected. But you need to consider the following. UPS should have output voltage in the form of «correct sine wave». The UPS must be significantly higher than the nominal power of the pump to handle high starting currents. You may need to use a smooth start device for the pump to allow the inverter to handle the load.