Our dog Chewie, a light Golden Retriever, is not only an excellent swimmer but also an excellent diver. Just look at the pictures we took when we were in Tahoe this summer. We take a rock and throw it in the water and he will "dive" for the rock and fetch that exact rock from the bottom of the Lake floor.
The reason Chewie can "smell" through the water is due to a structure in the dogs' body called the vomeronasal organ or Jacobson's organ. We humans do not have this organ!! It is an organ that runs along the floor of the nose, just behind the canine teeth. The organ is connected directly with the olfactory lobe via 608 (!) nerve bundles. In the roof of the dog's mouth there are two holes and the dog is able to pull scent through these holes. Chewie did not breathe underwater but he was able to smell the rocks we threw underwater without inhaling due to the vomeronasal organ.