Cavani has only started three games for the Red Devils this season, but came into the side for the Premier League defeat of Burnley last Friday (AEDT) after his strike at Newcastle United rescued a 1-1 draw.
The Uruguay striker has been linked with the likes of Barcelona and Juventus, having become frustrated with a lack of opportunities at Old Trafford.
But interim boss Rangnick has told Cavani, who is under contract until the end of June, he wants him to stay at United.
"He knows that I will definitely not let him go," the German said.
He added: "I told him from the very first day that, for me, he is a highly important player. He is probably the only one who can play as a striker back to goal and face to goal.
"And, as I said, his professionalism, his work ethic is just amazing and I told him that I desperately want him to stay until the end of the season. He knows that. He also knows how highly I rate him and how highly I respect him.
"We will definitely need Edi. I would rather have another Edi on top of that but for me it's clear that Edi has to stay."
One player who is expected to be on his way out of United is Anthony Martial, who has told the club he wants to leave.
Sevilla is reported to have had a loan offer for the forward rejected and Rangnick says he will only be allowed to move if the deal is right for all parties.
"He made it very clear that he wants to leave and, in a way, I can understand his wish to leave and to try to play more regularly somewhere else," Rangnick said.
"But, again, it's a question not only of what he wants to do but it's also a question of which kind of clubs are interested in him and do they meet the demands of the club, so we have to wait and see."
United will look to extend its unbeaten run to nine matches when it entertains Wolverhampton Wanderers in the Premier League on Tuesday (AEDT).