England won Group D and will face Italy in Kiev on Sunday.
Ukraine appeared to have evened the score in the 62nd minute when Marko Devic’s looping shot crossed the line before it was hooked clear by John Terry. But the goal was missed by the referee and his assistant behind the goal.
The disputed play will likely add to the pressure on UEFA President Michel Platini to reverse his opposition to goal-line technology.
“I was sad because the ball was in the goal by one meter,” Ukraine coach Oleg Blokhin said.
Rooney, who sat out his team’s first two matches at Euro 2012, headed in his goal in the 48th.
Steven Gerrard whipped a dangerous cross into the penalty area that went past two defenders before Andriy Pyatov let it slip through his hands as he crouched to collect the ball. Rooney was at the far post and put England ahead.
“There was a lot of pressure on Wayne,” Gerrard said. “But he stood up and when we needed him he was there.”
It was Rooney’s first goal at a major tournament since scoring four at Euro 2004 as an 18-year-old.
England is now unbeaten in five matches under Roy Hodgson, who took over the team last month after Fabio Capello’s resignation in February.
SWEDEN 2, FRANCE 0
In Kiev, Ukraine, France was given a rude wake-up call by Sweden as it was beaten in its final group game and had to rely on England to reach the quarterfinals.
Zlatan Ibrahimovic scored one of the best goals of the tournament with an acrobatic volley in the 54th minute, and Sebastian Larsson added an injury-time goal to give already-eliminated Sweden its first points of the tournament.
France’s 23-game unbeaten streak came to a crashing end as the already-eliminated Swedes exposed frailties in the back four and neutralized the dual attacking threat of Karim Benzema and Franck Ribery.
“We were too average in too many areas to hope to win this match,” France coach Laurent Blanc said. “The Swedish team played with all their hearts, they were better prepared than us. They had a player in their ranks (Ibrahimovic) who made the difference. If you analyze the game, we were in trouble for most of it.
“We’re very disappointed with how we played. The main thing is that we’ve qualified.”
Benzema and Ribery, who came into the European Championship full of confidence after career-best goal hauls for their clubs last season, still haven’t scored.