A hadith like this has been narrated on the authority of Zainab the wife of 'Abdullah, and she said
I was in the mosque and the Prophet of Allah (ﷺ) saw me and said: Give Sadaqa even though it is out of your jewellery. The rest of the hadith is the same.