Hi Zaa,
My son is now 26 months and will still insist on the boob at times rather than water or milk. He will only drink water, milk and fruit smoothies (home made) and wont have a bar of juices.
I found the same thing as nhockaday in that he would only drink from a cup, there was no chance of expressing my milk into anything and having him accept it. He would only drink breast milk up until he was 19 months. The only time he would have water was when he was alone with his father. Probably because he knew there was no chance of anything better
It may be that your son is still wanting breast milk only. There is nothing wrong with that as breast milk is 88% (or so) water. Since you are feeding him on demand it may be that dehydration isn't the cause of the constipation.
Here are some other common causes of constipation it may be worth investigating if any of these are probable causes.
Being inactive
Not eating enough fiber
Not eating regularly enough to stimulate the intestines to move food along
Certain high-protein foods
Not having a bowel movement when having the urge (some children after experience a painful bowel movement will try to keep their stools in and this can lead to constipation).
If it continues I would insist on the doctors doing a thorough check up.
I hope this is helpful, best of luck with it