Gareth Southgate's side dominated the first half but struggled to make it count until Rashford hit a superb free kick minutes into the second half, followed seconds later by a Foden tap-in.
Rashford netted England's third on 68 minutes with a clean strike that went through Wales goalkeeper Danny Ward's legs to seal a comfortable victory over their home nation rivals.
"It's been a challenge for him," said Southgate after handing Rashford his first start since June last year. "I went and saw him in the summer and had a long chat, he had some clear ideas on what he felt he needed to do and you can see with his club, that has shown itself with us. We have a different player to the Euros.
"It's great for him and great for us."
The result eliminates Wales from the tournament, while England, who entered Tuesday only needing to avoid a four-goal defeat, finish top of Group B with two wins and a draw and earn a place in the round of 16, where they will face Group A runners-up Senegal on Sunday.
Southgate made four changes from the side that were held to a goalless draw against the United States, with Foden and Kyle Walker brought in for their first appearances of the tournament and Jordan Henderson and Rashford also put into the starting lineup.
Wales boss Robert Page stuck with ageing stars Gareth Bale and Aaron Ramsey, whose places looked under threat after below-par performances in the loss to Iran. He made just three changes as Joe Allen and Daniel James were handed starting spots, while Ward replaced suspended goalkeeper Wayne Hennessey.
England were comfortable in possession for much of the first half but were held to just a small number of half-chances, the best of which came when Rashford was sent through one-on-one on 26 minutes, but the Manchester United forward's chipped attempt did not find a way over Ward.
Bale was brought off at half-time, with 21-year-old winger Brennan Johnson sent on in his place.
Southgate's side upped their tempo in the second half and immediately looked more dangerous in attack. When Foden, eager to run at defenders, won a free kick at 49 minutes, Rashford stepped up and powered a strike into the far top corner.
"In moments I thought both of them [Rashford and Foden] were a bit quiet in the first half," Southgate said. "We decided to switch wings and we thought that might allow them to go on the outside but also the chance to come in and they responded really well.
"And of course for them both to get the goals is great."
Foden doubled the lead within seconds as England won the ball back high up before forward Harry Kane whipped a low cross to the back post where Foden was arriving to tap home with ease.
Kieffer Moore had Wales' best chance of the match at 55 minutes with a speculative attempt from range that deflected off opposing defender Harry Maguire and forced an outstretched save from goalkeeper Jordan Pickford.
Rashford then added the third when he found a pocket of space in the opposing penalty area and struck through the goalkeeper's legs.
England could have scored even more in the final stages. Replacement forward Callum Wilson looked to add another late but saw his attempt saved, and defender John Stones missed a gilt-edged chance when the ball landed at his feet at the 6-yard box but he prodded his effort over the bar.