“It’s not been an easy couple of days for anyone at the club and that result almost feels like it’s for Ole,” said Carrick, a Champions League winner with United as a player in 2008.
“We had a job to do and things needed to be taken care of. I was happy to do it and thankfully it all went to plan.
“When you’ve suffered results-wise and aren’t in good form, individually and as a team, it’s not easy to come out and let everything click – we had to show some character and fight.”
Ronaldo maintained his record of scoring in every game in this season’s competition when he lifted the ball over goalkeeper Geronimo Rulli in the 78th minute, after Fred had dispossessed Etienne Capoue.
Sancho then sealed the victory in injury time, blasting a shot that went in off the underside of the crossbar.
However, United were indebted to goalkeeper David de Gea as he produced two superb one-handed saves, one in each half, to keep out well-struck efforts from Manu Trigueros when it was goalless.
United will progress as group winners with a game to spare after Atalanta could only draw 3-3 with Young Boys in the later game on Tuesday.
Man Utd win to lift the gloom
The result delighted United’s travelling fans, with Carrick hugging his players at the final whistle as some of the gloom over the club lifted.
A bad run of form has left them eighth in the Premier League, 12 points behind leaders Chelsea, with Solskjaer’s three years in charge coming to an end after an embarrassing 4-1 defeat by Watford on Saturday.
Carrick, Solskjaer’s assistant, said on Monday he was not thinking about a chance to impress and earn the role on a full-time basis.
Before the game in Spain, former team-mate Paul Scholes, now a BT Sport pundit, was scathing of Carrick and fellow coaches Kieran McKenna and Mike Phelan, saying: “I would be embarrassed being on the staff now.
“They all should have gone – sacked or gone off their own back. They have let the club down as much as Ole has.”
United have said they are looking to appoint an interim boss until the end of the 2021-22 campaign before potentially hiring a full-time manager after that.
Earlier on Tuesday, former Tottenham boss Mauricio Pochettino said he was “so happy” at current club Paris St-Germain and that he would not be distracted by links to the United job.
During the match, it was revealed former Barcelona boss Ernesto Valverde had been contacted about the role of interim manager.
However, despite the off-field distractions and criticism, United secured their first clean sheet in 15 matches – only their second of the season – and whoever takes over will have Champions League football to look forward to in February.
Ronaldo again gets his side out of trouble
Solskjaer scored the winning goal for United in the 1999 Champions League final and, despite losing his job, remains a club legend and was still sung about by their fans.
Without him, Carrick made four changes from the 11 that began the loss to Watford, as Donny van de Beek was handed his first start in two months and Bruno Fernandes dropped to the bench.
Villarreal, managed by ex-Arsenal boss Unai Emery, are 12th in La Liga, having only won three of 13 domestic league matches, but were the better side in the first half and start of the second.
In a repeat of last season’s Europa League final, which Villarreal won 11-10 on penalties in Solskjaer’s solitary final as United boss, the hosts had good chances to take the lead.
Yeremi Pino fired into the side netting, Trigueros twice forced excellent one-handed saves from De Gea and Arnaut Danjuma twice shot over the bar as United came under pressure.
But Ronaldo, whose 95th-minute goal gave United a 2-1 win against Villarreal in the reverse fixture at Old Trafford in September, again made the difference with his sixth goal of this season’s competition.
Rulli’s clearance found Capoue, but the former Tottenham and Watford midfielder lost the ball to Fred, and it then fell to Ronaldo with the Portuguese forward quickly lifting it over Rulli for United’s first.
Fred was again involved in United’s second goal as he began the move, also involving substitutes Marcus Rashford and Fernandes, with the ball ending up at Sancho’s feet.
The England international struck powerfully past Rulli for his first goal since his £73m summer move from Borussia Dortmund to clinch the victory and a last-16 place.