This is a controversial question. Some parents will react harshly if they hear you scolding their children, and others will be perfectly fine with it. This is really something you must do with caution.
In most cases, it would be acceptable to discipline a child (with words, never spanking) if this child was causing harm to another person or a piece of property. This is also acceptable if you are a teacher, crossing guard, bus driver or generally in a position where you interact with children on a daily basis. In fact, you might even feel obligated to discipline the children of a friend, but it is wise to ask first.