CocoT: actually, I think you should rather make them walk. That'd ensure that they can't exit the water, as long as there are no stairs and slopes they can use. Make it a pool you have to jump out of, and it'd be fine. Assuming ofcourse the water is shallow in all spots, or the fishy would "drop" to the bottom of the lake
It obviously is possible to switch between different modes, but that requires experimentation and whatnot. Best I can think of is do an onground check, if true, walk, otherwise swim. Also, if players origin is above self origin, and player is in water, then swim (to ensure they don't walk around the bottom of some lake). This should basicly do it, it'd allow fishy to enter walk mode when a slope makes the water shallower, as they'd detect floor when they get close to the edge of the water, and start walking. If the player then goes back into the water, the fishy will walk after him, until the player is at all above the fishy, and thus start swimming again.