The winners of Group B, England will face Senegal in the next round on Sunday.
Rashford started the scoring for England with a free kick in the 50th minute, and Foden doubled the goal tally a minute later.
Rashford scored the match’s final goal when his shot went through the legs of Wales goalkeeper Danny Ward in the 68th minute.
Iranians had been hoping for a repeat of their 1998 World Cup victory over the United States but their 1-0 defeat in Qatar on Tuesday plunged Tehran into disappointed silence as they exited the tournament.
England will play Senegal in their second-round knockout game on Sunday, 4 December, while the United States will play the Netherlands on Saturday, 3 December.
France’s 2-1 win over Denmark saw them become the first team to book their place in the last 16, before Brazil joined them by beating Switzerland 1-0.
Portugal also secured their qualification after beating Uruguay 2-0 on Monday, while Groups A and B finished on Tuesday.
Meanwhile, hosts Qatar, Canada and Ecuador have been knocked out.
Poland and Argentina are the top two in the group following 2-0 wins over Saudi Arabia and Mexico respectively on Saturday.
But those two meet in Wednesday’s group decider, meaning there is a decent chance either Lionel Messi or Robert Lewandowski go out.
Poland would be guaranteed progression with a draw, while Argentina will go through if they win.
Both sides will go through if both games are drawn.
Saudi Arabia will secure their shock entry to the knockout stage if they beat Mexico.
Mexico need to beat the Saudis to have any hope of going through. They would be through if both they and Poland win.
Any other result in the other game would probably mean the Mexicans would need to win by a few.
Kylian Mbappe scored twice to see France beat Denmark 2-1 and seal their place in the knockout stage.
A draw in their final qualifying game against Tunisia on Wednesday will also seal top spot.
Any of the other three teams could qualify along with Les Bleus.
Australia will be through if they beat Denmark, but a draw would allow Tunisia to claim second spot if they upset France.
Denmark have to win to have any chance of going through.
If Denmark and Tunisia both win their games, the team to progress will be decided by goal difference or the other criteria mentioned below.
All four teams in Group E can still progress after Germany fought back from a goal down to draw 1-1 with Spain on Sunday.
The last matches in this section take place on Thursday with Costa Rica playing Germany and Japan facing Spain.
Spain will win the group with a victory or a draw – as long as the other match also ends in a draw or a Germany win.
If Spain were to lose, Japan would win the group and the Spanish could still be eliminated. For that to happen, Luis Enrique’s side would need to lose and Costa Rica beat Germany, or for Germany to win and overturn a goal difference currently eight worse than Spain’s.
Japan will also finish in the top two if both matches end in a draw.
Costa Rica will be through if they beat Germany and will be group winners if Spain also draw with Japan. A draw for Costa Rica will only be enough to qualify if Spain beat Japan.
Germany are bottom but will qualify as runners-up if they win and Japan lose. If Japan draw, Germany may need to win by two goals as their goal difference is currently one worse than Japan’s.
Canada scored their first-ever World Cup goal on Sunday but it was only fleeting joy as Croatia hit back, scoring four times to put them out of the running for the last 16.
That leaves Croatia top of Group F on goal difference, knowing they will ensure qualification if they avoid defeat to Belgium.
They will also seal top spot if they match Morocco’s result and maintain their superior goal difference.
Morocco will be through if they win or draw their final group game against Canada.
Belgium will qualify with victory against Croatia. A draw will only be enough if Morocco lose to Canada, with goal difference deciding the order in which they go through.
The final games are played on Thursday 1 December.
Five-time winners Brazil secured their place in the World Cup knockout stages after Casemiro struck seven minutes from time to seal a 1-0 win over Switzerland on Monday.
Tite’s side require one point from their final game against Cameroon to clinch top spot when the final two Group G matches take place on Friday, 2 December.
Any of the other three teams could join Brazil in the last 16.
Second-placed Switzerland must beat Serbia to guarantee their progress, while a point would be enough if Cameroon fail to beat Brazil.
Serbia and Cameroon both need to win their respective games to keep alive their qualification hopes.
Should both sides manage to get the win they need, Cameroon have a slight advantage with a marginally better goal difference.
Portugal have joined France and Brazil in booking their place in the knockout stages with a game to spare thanks to a 2-0 victory over Uruguay on Monday.
They need just a point when they take on South Korea on Friday to guarantee top spot in the group.
Second-placed Ghana will progress to the last 16 by beating Uruguay.
A draw will also suffice as long as South Korea do not beat Portugal by two goals or more.
In the event that Portugal lose and Ghana win, top spot will be decided on goal difference and goals scored.
South Korea’s have two routes to making it to the next round in Qatar, which both rely on them beating Portugal.
If Ghana and Uruguay draw, South Korea will need to beat Portugal by two clear goals to advance.
If Uruguay and South Korea both win then it come down to goal difference – and possibly goals scored – with the Asian side holding a one-goal advantage.
Uruguay’s simplest path to the last 16 is to defeat Ghana in their final match and hope that South Korea fail to beat Portugal.