For humans, humans cannot smell when they have water stuck in their noses. However, I am wondering if elephants can smell scents when they have water in their trunks, as they are designed to hold water.
Yes they can, as the G protein-coupled olfactory receptors detect presence of molecules and no receptors exist that are inhibited by competitive binding of water molecules.
Both you and an elephant can smell (with) water in the nose! Just try it! I am sure you can smell a difference between pure water and water with a tiny drop of perfume in it if you aspirate it though your nose!
When you say 'humans can not smell when they have water trapped in their noses', I believe you mean the loss of the sense of scent caused due to nasal congestion, which is due to inflammation, blocking the scent receptors in the nasal cavity (any mechanical blockage preventing odours from reaching the olfactory nerves can cause a loss of sense of smell. This blockage can be due to inflammatory processes like simple infections causing mucus plugs or nasal polyps(1)). Since the basic structure of the respiratory tract is similar in mammals, mucous plugs reduce scent sensitivity in elephants as well.
Olfaction occurs when odourants bind to specific sites on olfactory receptors located in the nasal cavity. They get into the nasal cavity when you breathe or sniff the air.
Molecules of odourants passing through the superior nasal concha of the nasal passages dissolve in the mucus that lines the superior portion of the cavity and are detected by olfactory receptors on the dendrites of the olfactory sensory neurons. This mucus acts as a solvent for odour molecules, flows constantly, and is replaced approximately every ten minutes. ...(2)
(Thanks to @Adhish for the above point.)
If the water itself has a scent, then, as @KaPy3141 pointed out, it can be distinguished because it is in contact with the olfactory receptors. Scent of anything else outside cannot be determined, because they do not reach the receptors.
Elephant lungs are attached directly to the diaphragm and chest wall, allowing them to create much greater "vacuum pressure" for sucking water through their long trunks, while drinking.(3) To open its mouth to breathe would cause the loss of the low pressure and the water column would expelled. So the water column must first be transferred to the mouth, then swallowed before breathing can recommence.(4) Thus, as far as respiration is concerned, they cannot breathe when the trunk contains a column of water, and, as a result, odourants cannot enter the nasal cavity, and elephants cannot smell in this case.
Humans are not designed to have water inside their nose, so water doesn't get stuck there very naturally. Neither humans nor elephants can inhale new scents if they have their nose blocked by water or otherwise, but the olfactory cavity will still transmit some information to the brain even if the nasal passage is obstructed.