While one is using the bathroom to relieve themselves there should not be other people with them, because of tznius. However, with a child that needs help it is permitted for someone to be with them. As well, a child that is very young and not old enough to tell over to others what they saw, is permitted to be in the bathroom while the adult is using the bathroom.