The result gave Canada nine points and likely will mean that it will not have to face southern neighbor and the defending champion United States in the semifinals on Friday. The United States leads Group B and will play host Panama on Tuesday for first place.
Mexico finished second in Group B with six points. The group winners will play the runners-up from the opposite group, meaning El Tri appears destined for a knockout round meeting against the Americans.
The semifinal winners and the winner of Sunday's third-place game will qualify for the U-20 Women's World Cup in Japan.
The victory was some revenge for Canada, which lost its last meeting against Mexico - 1-0 in extra time in the 2010 championship semifinals which helped contribute to the Canadians failing to qualify for the World Cup for the first time.
Playing their third match in five days, neither team came out quickly, with the two combining for three shots - one on goal, before Legault-Cordisco's tally.
Shelina Zadorsky had a free kick just outside the right side of the Mexican penalty area and rolled it square toward the goal box. Christabel Oduro made a diagonal run, flicked it with her shoe into the path of Legault-Cordisco, who worked inside defender Christina Murillo and tapped in from three meters.
The goal sparked a surge in Canadian play, with Nkem Ezurike getting three chances with a matter of minutes. She had a break away, forcing Mexican keeper Cecelia Santiago to abandon her line and rolled a shot under her but just wide the right post in the 31st.
Santiago then blocked Ezurike twice in short succession in the 34th and then thwarted Oduro five minutes later.
Mexico pressed throughout the second half, needing only a goal to get a draw and win the group on goal difference. Canadian keeper Sabrine D'Angelo was busy fielding a variety of crosses and corner, and having to tip Yamile Franco's left-footed drive from the edge of the area over the bar in the 78th
With Mexico pushing forward, Canada was able to counter and nearly scored a second in the 73rd. Richardson was able to break in alone and Santiago raced off her line. Jenna Richardson scooped the ball from outside the area that Santiago was just able to get her fingers to, enough to deflect the ball off the right post.
Mexico's best last chance came in the first minute of injury time, when Daniela Solis slipped inside Canadian defender Rachel Melhado on the right side of the area and put a shot off the crossbar.