Beer and caffeine are diuretics, so you do retain less fluid with them than if you drank water only; however, whether this is a problem or not depends on a lot of different factors, including what else you're eating (salt not only makes you drink more, it retains water in the system) and how much you're exerting yourself. A modern, normally sedentary, person who works or plays harder than usual - say, mountain climbing or camping in the heat - and drinks iced tea, beer, or soda and dry food will probably dehydrate badly and will lose more nutrients than he takes in; a medieval peasant was in such a different situation, it's hard to imagine.
If your water gives you dysentery, you'll dehydrate much faster than you will from an ordinary diuretic!
Sometimes you even want to lose water; the women here know what I mean.