Rationally it should not be possible for an evil jinn to take a form which is previously known to have been taken by an angel. That is because of the necessity of infallibility and protection. Such angels act as Messengers of Allah - if a devil could take their form then it would not be possible to know what instruction comes from Allah and what actually comes from the devils.
From ahadith we know that jinn can not take the form of the Prophet Muhammad ﷺ:
ولا يتمثل الشيطان بي
Satan cannot imitate me in shape
And various scholars have noted that the same extends to the other prophets and the angels:
ورؤية النبي صلى الله عليه وسلم في المنام حق، ولا يتمثل الشيطان به، وكذلك جميع الأنبياء، والملائكة عليهم السلام
And seeing the Prophet (peace and blessings of Allah be upon him) in sleep is in truth, and the devil can not take on likeness, and the same applies to all the prophets and angels - peace be upon them
— Sharh al-Sunnah
And when that applies to dreams then it would apply even more to real life.