Man Utd fans chanted Ole Gunnar Solskjaer's name during their win over Villarreal
Cristiano Ronaldo and Jadon Sancho both notched in the win in Spain, which secured qualification for the last 16 of the Champions League.
Carrick said after the win: "It’s a terrific night for the players, a terrific night for the club, to go through in the Champions League is amazing. That one’s for Ole that."
Both men were signed by Solskjaer, but the 48-year-old struggled to get his summer signings to gel with a squad that finished second last term.
The Norwegian left Old Trafford without delivering a trophy, meaning their silverware drought dates back to the 2017 Europa League final.
Solskjaer spoke openly about his departure from United in the immediate aftermath of his dismissal: “Very, very proud. Of course, it’s one of those things you dream of in your life.
"When you’ve been a player, when you’ve been a reserve team coach, the next job then, the only dream and the only thing you haven’t done is to manage the club, and I have now.
"It’s been a ball, it’s been absolutely enjoyable from the first to the last minute.
"First of all, I want to thank the board and the owners for giving me the opportunity because it’s not for everyone and I’ve had the opportunity.
"I’m so honoured and privileged to have been trusted to take the club forward, and I really hope that I leave it in a better state than when I came.
Ole Gunnar Solskjaer said his goodbyes last weekend at Watford
"I’ve made great friends, I’ve reconnected with some great friends, new staff coming in I’ve become really good friends with. The other staff that was here when I was there, we’re good friends and we have connected and that’s what it’s about at a club like this.
"With the fans, the fans have been amazing. From day one at Cardiff until the last one now. [They’ve been] top, and we’ll see each other again.”
He also added: “I think there is potential in this club. We all love the club, and we all want to see it continue.”
Ralf Rangnick is set to come in and take charge of United until the end of the season before a manager is sought in the summer.