Imam Ali (AS) was the owner of that ring and he gave it to the poor person. According to a narration from Ammar Al-Sabaati عمار الساباطي from Imam Jafar Al-Sadiq (AS), the ring was in the finger of Miran ibn Tawq who was leader of Kafirs who was killed by Imam Ali (AS) and the ring was taken from his fingered by Imam Ali (AS) and was given to the Prophet Muhammad (SAWA) who gave it back to Imam Ali (AS) as part of his share from the spoils and put it in his own fingered then gave it to the poor person during his Rukoo'.
'Al-Ghazali who is a well known Sunni scholar stated in his book Sirrul Alamein that the ring which Imam Ali (AS) gave to the poor during Rukoo' was the ring of Sulaiman (AS).
Wassalam.