The France international has signalled a desire to leave Old Trafford this month and is expected to move on before the winter transfer window closes for business.
Rangnick has hailed the forward's professionalism against the Hammers, with the victory moving the 20-time English champions into fourth spot in the Premier League table.
"When we last spoke one-and-a-half weeks ago, I told him it is all about being professional until the very last day. No mention of how long he will stay or wanting to leave, for me it is about being professional. I think it was good to have this conversation with him," Rangnick told reporters.
"In the last two games, he was part of the squad and today he played a vital role in creating that goal we scored.
"I know that he is a top player, one of the best strikers in the Premier League, but we have other players in this position and it is his wish to leave and as I said to him, 'listen, it always takes different parts to make an agreement' and the way that he trained and the way he played when he came on today showed that the professionalism that I expect from everybody.
"I am happy that he was playing today and that he could come on and that he played a vital role in preparing that goal."