If I wanted to take a cat over an ocean, would it teleport behind my boat?

Pets can only teleport to land, so if you cross a large enough body of water and they can't keep up by swimming, they will be unloaded and will be unable to teleport to you when you come to land.

One way around this is to swim or boat slowly so that they keep up. Another way is to make a path through the nether and take them through that way.