Allegri criticised the player for his outburst at the end of a 2-1 defeat to Napoli on Sunday.
“Mario has made a mistake, penalizing the team, club and the fans and he must change this,” said Allegri.
“Balotelli should help referees to protect him because if another player had suffered the fouls he did on Sunday then they would have whistled. The referees should be left alone because they can be influenced by negative attitudes.
“Mario is 23-years-old, he is no longer a child and to be a champion you have to have a correct behavior because you are an example for all those who look up to you. I hope for him he benefits from it and realizes that put team and club is in difficulty.
“You have to go on the pitch thinking about doing well. When you finish the game you need to go in the dressing room, accept what happened and think of working to do better. The club will decide what to do about Mario."