Also in Group D, England and Japan were already through to the last 16 before meeting in Nice, where two goals by Ellen White secured a 2-0 victory and first place with a maximum nine points.
Argentina fought back from three down to draw 3-3 in Paris to eliminate the Scots as they climbed to third. But they only have two points and are weakly placed in the battle to finish as one of the four best third-place teams.
To advance, the Argentines need an unlikely pair of draws in Thursday's final set of group games.
England will head to Valenciennes in northern France for a last-16 tie on Sunday against a third-placed side with China, Cameroon, New Zealand, Chile and even Thailand all potential opponents.
The permutations are less complicated for Japan, but the Nadeshiko -- World Cup winners in 2011 and runners-up in 2015 -- will have a stiffer-looking test in Rennes against either the Netherlands or Canada who meet in Reims Thursday to decide the Group E winners.
The stakes are higher for Cameroon and New Zealand who play in Montpellier in the group's other game.
Victory by two goals -- or just one in a high-scoring match -- would make either Cameroon or New Zealand one of the four best third-placed teams.
"We just need to make sure we win on Thursday and make sure we do everything possible and get to the next round," Cameroon defender Estelle Johnson said.
The situation is similar in Group F with Sweden and USA, who meet in Le Havre, both on six points. The group winner will face Italy in the last 16 with the runner-up playing the Netherlands or Canada.
The Americans will be looking for revenge against Sweden, who eliminated them on penalties in the Olympic quarter-finals in 2016 meaning they became the first US women's team to fail to win a medal.
Chile and Thailand, who meet in Rennes, are both pointless. Unless the earlier game in Montpellier ends in a draw, in which case a win by any score will be enough, Chile will need to win by three goals and Thailand, who let in 13 against the USA, will need to win by 14.
Scotland looked to be going through as one of the best third-placed sides when Erin Cuthbert's 69th minute goal put them 3-0 up against Argentina at the Parc des Princes in Paris after earlier strikes from Kim Little and Jen Beattie.
However, Milagros Menendez replied with Argentina's first goal of the tournament in the 74th minute, and then Bonsegundo's shot went in off goalkeeper Lee Alexander to set up a grandstand finale.
With two minutes left, after an agonising VAR review, Argentina were awarded a penalty.
Alexander saved Bonsegundo's tame first attempt, but VAR caught the goalkeeper straying off her line and the Argentine converted her second effort in the fourth minute of stoppage time.
The draw left Scotland on one point, bottom of Group D and eliminated.
"We gave it our all for 70 minutes of the game. We were very good but we didn't manage to see the game out, but at this moment in time we feel hard done by," said Scotland's disconsolate coach, Shelley Kerr.
England's coach Phil Neville was happier.
"We've got another clean sheet, we've won another game, we've played three and won three, and we're just where we want to be, in the last 16, and ready to attack the business end of the tournament," he said.