The Prophet ﷺ used to anoint himself with oil while in the state of ihram, as long as it was not perfumed oil.
حدثنا هناد حدثنا وكيع عن حماد بن سلمة عن فرقد السبخي عن سعيد بن جبير
أن النبي ﷺ كان يدهن بالزيت وهو محرم غير المقتت
Its chain is daif. Ibn Majah also narrated it in the chapter on rites, in the section on what oil the one in ihram may use, no. 3083, from the hadith of Waki with the same wording. Ibn Khuzayma mentioned it, no. 2652, and indicated that it is daif. Bukhari narrated it, no. 1537, as a statement attributed to Ibn Umar alone, and that is the correct view.