Cavani, who is out of contract in the summer, has been linked with a January move to Barcelona or a return to South America but Rangnick has said the 34-year-old has promised to stay until the end of the campaign.
“I told him that if it was up to me I would want him to stay,” Rangnick said.
“I had a conversation with him [on Thursday]. He came into my office and we spoke for almost half an hour and he told me he will definitely stay and would want to stay until the end of the season.
“Not only because I told him that he should stay or has to stay, he did it on his own behalf and he told me that I can rely on him to stay until the end of the season and give his very best and be a role model for the young players.
“If he should play from the start, he’s available and he’s happy to play.
“Even if he’s not playing, he will be trying to be the best possible role model for the other players and for me this is good news.”
United and Rangnick begin their FA Cup campaign with a home tie against Aston Villa on Monday.
The club have not won a trophy since lifting the Europa League under Jose Mourinho, and Rangnick has promised to pick a strong side against Steven Gerrard’s Villa.
Villa have already won at Old Trafford this season — a 1-0 victory in September — and since Gerrard’s appointment have climbed to 13th in the table despite losing their last two games to Chelsea and Brentford.
A home game against Middlebrough in the fourth round awaits the winner.
“I’ve always been a big fan, supporter and admirer of the FA Cup,” Rangnick said.
“For me it’s a very important competition. We will definitely try to play with our best possible team in that game and a strong team. We take the game as seriously as we can and hopefully get one round further ahead but in order to do that we have to be successful against Aston Villa.
“We know it will not be an easy game because especially since they change managers they have been doing well. They won four games and lost four games, three of them against the top team. It needs a top performance from us to be successful.”