I read a YA fantasy or sci fi book in the mid to late 70s. I was 10 to 13 years old. I checked the book out at the same time as Enchantress of the Stars. The protagonist was a young boy or teen who thought his world was unfair. One of the rules was that no one was to drink stream water. The world was ruled by judges. The protagonist thought this was an unfair system. He drank the water, turns out he shouldn’t have. Also, because he questioned authority (spoiler alert) he became a judge. Thanks!
I believe the authors last name began with an A or B. I reread it a few times as a kid and seem to remember finding it before Baum (I read all of his Oz books), alphabetically.