Bring a bottle is the simplest solution but not necessarily optimal.
I like the Little John. It's more easily positioned than a regular bottle to avoid spills.
Little John
My wife and I both use these:
Travel John
They are single use, they fit women well and they don't spill.
Both require some amount of in-plane gymnastics to use.. at least for us.
What I don't recommend is dehydration or putting a cork in it. Nothing worse than having to go, badly, 5 miles out.
Actually there is something worse; having an accident due to being 'stupid' from dehydration. People manage their bladders by limited dehydration every day and it works until it doesn't. Most of our flying is low stress in a comfortable cockpit and a little dehydration generally won't hurt much. Racing sailplanes, I've seen people 'lose it' due to it. I've 'lost it' due to it. I don't know about you but my bladder isn't the only thing not working as well as I get older. I drink enough liquids to be comfortably hydrated, coffee when I want it, and I always carry 'bottles'. 'nuff said.
Enjoy the X/C!