Is this heat pump approved by your local codes or that of NSPF for use in or around swimming pools? I think not. Not a good idea to mix water and electricity.
Yes you could, if you live in a very hot climate... heat pumps would only be able to heat water to spa temperature if the weather was very hot all the time. It works the reverse of an air conditioner, but relys on outside air to convert cold to hot water.