Whenever the Prophet ﷺ entered the lavatory, he would remove his ring.
حدثنا نصر بن علي الجهضمي حدثنا أبو بكر الحنفي حدثنا همام بن يحيى عن ابن جريج عن الزهري
أن النبي ﷺ كان إذا دخل الخلاء وضع خاتمه
Its isnad is daif. Abu Dawud narrated it in the Book of Purification, chapter on the ring that has a mention of Allah on it being worn when entering the toilet, hadith 19, from Nasr through this route, and he said, "This is a munkar hadith." Tirmidhi graded it sahih, hadith 1746, while Nasai graded it daif (Tuhfat Ashraf, 1/385). Ibn Jurayj is well known for tadlis, and I have not found an explicit statement that he actually heard this.