Yes dehydration is possible, but it could be other things. If your friends don't typically get a headache from three beers (the equivalent of a single one of your beers), then it was probably not dehydration that caused the headache.
The guy at the local homebrew store where i live says he gets headaches from hoppy beers, i'm guessing that your friends would know if they were allergic to hoppy beer.
Some commercial beers give me a headache. I'm not sure if it is caused by bad brewing techniques (fusel alcohol), by preservatives, or by nitrates. Sammy Smith gives me a raging headache.
Was there a lot of yeast floating around in the beer?
Tap: Centennial IPA (SMASH)
Tap: Dogfish Head Ginger Saison
Bottle: Stone 11th Anniversary Black IPA clone
Secondary: Flemish Brown Sour Ale