Java Edition:Aquatic Mob in Boat
Most aquatic mobs can't enter boats. This is most likely to ensure the player doesn't pick up random passengers when crossing the ocean. The affected mobs are cods, dolphins, pufferfish, salmon, and squids. All 5 of these mobs could be obtained in boats during some time range. Due to the fact that aquatic mobs will slowly die if out of water for too long retaining these mobs is challenging. The easiest way to retain these mobs is to put them above a bubble column.
Obtaining
Like any other mob, the boat just needs to run into the mob in their version range.
Squid
Squids could be put in boats from 15w41a to 16w03a.[1]
Fish
Cod, salmon, puffer fish and tropical fish could be put in a boat from 18w08b to 18w14b. This was reported as a bug but it was marked as "works as intended" yet the ability to put them in boats was removed in version 18w15a.[2]
Dolphin
Dolphins going into boats was reported as bug and fixed in 1.13-pre2.[3] This allowed the player to obtain a dolphin in a boat from 18w15a to 1.13-pre1.
22w13oneBlockAtATime Mob Wrestling
In the April Fools' version 22w13oneBlockAtATime, the player can pick up nearly any entity to create mob stacks in any combination. This powerful method also allows for any aquatic mob in a boat to be obtained.