Dogs can "swim" if they are sitting and pushed into some water. Once you save and reopen the game, they can swim while sitting.
- Get a wolf and tame it or use an existing dog
- Make it sit by right-clicking on it
- Find some water nearby and push the dog in the water or create a small body of water
- The dog should now stand.
- Save the game and go back into the world.
- The wolf should be sitting, and it can still move.