5th kyu shouldn't teach a class, if there are other students with 1 and 2nd kyu around, that's for sure. It was clearly wrong decision of chief instructor.Such situation is not good for a dojo from pedagogical and technical point of view. Particularly it harms this poor guy, who had to teach a class.
If such mistake is repeated, it will lead to a real disaster.
With respect, I disagree. Part of any keiko is to follow instructions; teacher says do irimi-nage, you dont stand there and say "No, kote-gaeshi would work best." (of course you may think that, just dont do that).
I personally know of a 6th dan who teachs, by his own admission, a student who is his senior in years of training and ability though not in rank. Shihan said teach class, so the 6th dan student does as he is told.
Beer: agree, but after, not instead of, training.