They do make electric resistance heaters for pools. They are definitely the most inefficient way to heat a pool and they should be avoided. Heat pumps also work on electricity only and are a good option for heating a pool. Solar is also a good option for heating a pool if you have south or west facing roof space available.
Good brands of heat pumps are Hayward, Pentair, Raypak and others.
We have both and it is a good combo to keep our pool warm. We swam from March 13th through Oct 22 this year. More about heating our pool in my pool thread, link in sig.