Think that's pretty common. People heat their hot tubs also & should be about the same application.
Would require a heat exchanger (I think a shell/tube type is most common for this), a controller (Johnson A419 is pretty common & adaptable - it may have been upgraded to a different model since I got mine) - and matching pipe routing. Maybe a zone valve if you don't want flow going thru the HX when you don't want to be heating the pool. Thinking you would plumb the filtering flow to go thru the pool side of the HX when the filter pump is running?
Hopefully someone who has actually done this will be along with more input. You'd also want to be very careful about things freezing & breaking in the off season - maybe have it so you could shut off & completely drain that part of the system.
BTW what do you have for underground pipe? Would be the ideal time to asses that and maybe upgrade if you don't have really good stuff, like Thermopex or Logstor or similar.