Halachically spoken he doesn't need to give it back.
Mishna Pea 8.8
היו לו מאתים חסר דינר, אפילו אלף נותנין לו כאחת, הרי זה יטול. היו ממושכנין לבעל חובו או לכתובת אשתו, הרי זה יטול.
Sota 21b:
What is the cunning rogue like? ...
R`Abbahu says: He who gives a poor man a denar to bring his possessions to the total of two hundred zuz; for we have learnt (Mishna Pea 8.8); He who possesses two hundred zuz may not take gleanings, forgotten sheaves, the produce of the corner of the field, or the poor tithe; but should he lack one denar of the two hundred [zuz], even if a thousand persons give him [the gleanings, etc.] simultaneously, he may accept.
So, Halachically spoken he doesn't need to give it back. There is a discussion in Melechet Shelomo if the case is that 1000 persons give him simultaneously as the English translation shows or someone gives him 1000 dinar. The Tur and SA interpret the Mishna as the last case, but the Melechet Shlomo says that the first case is closest to the pshat of the Mishna. Following this Halacha, Kal vachomer if someone gives him a time before he becomes rich.
In Halacha Tur YD 253
יש לו מאתים זוז חסר דינר, אפילו נותנין לו אלף זוז בבת אחת, הרי זה יטול.
SA YD 253.1
ואם יש לו ר' זוז חסר דינר ואינו נושא ונותן בהם אפי' נותנים לו אלף זוז בבת אחת הרי זה יטול: