A standard heat pump water heater does that but will only provide a couple degrees of cooling to meet standard domestic hot water needs. You can also get pool heater heads for heat pumps/ac units though last time I looked not all were available in the us.