Portable air-conditioning system output problem
As an abstract question, yes you could transfer the heat to water. But in practice it is a totally unfeasible solution. Even a small AC will remove 5k BTU/hr from the air while also generating some heat of it's own. So let's call it 8k BTU/hr total heat generated.

At that rate you would heat 5 gallons of water from 70 ºF to 100 ºF in less than 10 minutes. And that's assuming perfect heat transfer to the water and no heat leakage back into the air.