It was technically a foul. It was either a push or a charge, not shoulder to shoulder, with his arm slightly up and against the back. It arguably falls under the definition of careless: "shows a lack of consideration or attention when making the challenge", so it's a very wide and ambiguous definition which can catch a lot and therefore this action was within the scope of Law 12.
But that's not the end of the analysis. You then have to consider the "trifling" standard, which doesn't appear in the laws of the game and sometimes (and sometimes not) appears in the guidance to referees. Was it sufficiently trifling that calling it would impact the flow of the game since we want to discourage constant whistles?
There are different schools of thought on the trifling standard, and very broadly at the youth level (yeah, it's a total oversimplication) there are basically two poles or school of referees. The let em play" school which believes the trifling standard should be very broad and the game should only very rarely be interrupted (since it is a contact sport). And the "rules" school which believes in the letter of the law of the laws of the game. There is no agreement out there over how broad that trifling standard should be and indeed it varies from ref to ref and individual refs may call things differently (e.g., very loose on technical fouls on a throw in but rigidly punishing the keeper if he comes out with a knee up). It may also depend on the level of play (whistle everything for AYSO rec, whistle nothing for gold level games) but that's also not always true as I've seen AYSO refs who surprisingly let everything slide.
As to the foul in question, well that's why players dive in soccer. Because it makes it clear to the referee that the situation is not just "trifling" but sufficient force to send the player down. If Mendy had gone down, the referee may have called a foul, therefore Mendy did something stupid and is responsible for that goal, at least as the laws are currently [brokenly] structured.
Manchester City's Benjamin Mendy chose not to dive when he could have. The decision cost his team points against Wolves.
sports.yahoo.com
That's why winning coaches (in addition to high knees....winners always do high knees) should as part of his coaching curriculum teach proper diving technique