heat pumps just run something similar to a reverse Carnot cycle on their refrigerants and use a condenser coil to release the extra heat to the water. So for all practical purposes it heats the water inside the tank in a pretty similar fashion to how a normal electric water heater works, it just delivers it from a slightly different source and it isn't electric resistive.
So no, not possible. Theoretically you might be able to do it with a stupid enough system of coils and a very ridiculous amount of power, but it wouldn't be efficient or practical.
I'm still not sure why not possible. A tankless waterheater is just a regular water header with a tiny tank (pipes count as a tank...). I know electric tankless water heaters exists - they draw massive amounts of power (I considered one for my house, but it needs 4x 40 amp, 240 volt circuits - like most houses in the US I'm limited to 200 amps total and I suspect at times I'm using more than the remaining amount (not for long, but long enough to blow the main breaker)
So no, not possible. Theoretically you might be able to do it with a stupid enough system of coils and a very ridiculous amount of power, but it wouldn't be efficient or practical.