Chile finished third in the nine-nation group with 28 points with Ecuador fourth on 25.
Uruguay finished level on points with Ecuador but took fifth place, and a spot in a playoff against Asia's Jordan in November, due to an inferior goal difference.
The top four teams - Argentina, Colombia, Chile and Ecuador - advance to the finals automatically.
Chile started in good fashion, with Jorge Valdivia and Sanchez missing chances before the third minute.
Sanchez showed his best form again with the national team and was a constant threat to Ecuador's defence.
The pace slowed after the hectic start and it was just before the half-hour mark when the next chance arrived, Valdivia testing Ecuadorean goalkeeper Alexander Dominguez with a long-range effort.
Chile's pressure was rewarded in 35th minute when Sanchez scored with a header after a precise cross from Eugenio Mena.
Two minutes later, Medel doubled the advantage, connecting with Sanchez's header following a Marcelo Diaz corner kick.
Ecuador showed little urgency, despite the danger of losing out on an automatic qualifying berth, and forwards Felipe Caicedo and Jefferson Montero had to drop deep to get on the ball.
After the break Chile kept on the attack and midfielder Arturo Vidal smashed the post with a powerful header in the 52nd minute.
Ecuador got on the scoreboard in the 66th minute, capitalising on Antonio Valencia's pass.