I don't think it's a matter of law, so much as practice. On paper, Cersei could have stopped Joffrey, because he was a minor and does not have the full theoretical legal powers of his office.
In practice, she doesn't have the pull to be able to counter him, which may partly be a gender thing, but it's also, I expect, because Joffrey was almost an adult, so a lot of people would choose to follow his orders anyway just because he would very soon be in full legal control and nobody wanted him harbouring grudges against them.
It's the same situation as with her and Tywin. On paper, the Queen Regent is actually Tywin's boss when he was Hand. But in practice, of course, that idea just doesn't fly, and even Cersei doesn't really believe that Tywin isn't the one in charge.