Yes you can.
The heat source sends heat to the pool (via a heat exchanger) instead of your floors during summer.
To maximise efficiency and minimise running costs, we would recommend only using a heat pump for this purpose (and it’s even better if you combine this with PV solar power).