The 6 Pokemon Rule only applies to the trainers with Pokedexes. Throughout the Anime history they had people that had more than 6, Misty even hinted that she had more than 6 Pokemon when she and Brock explained the rules to Ash. To keep the teams moderated the writers just never gave any of the non-Pokedex holding members more than 6. I don't remember them having more than 4 in most cases.
But it was established in the early days, you have to have a Pokedex in order for the 6 Pokemon limitation to take effect.