It is narrated from Sayyidah Busrah bint Safwan (may Allah be pleased with her), who was a companion of the Prophet (peace and blessings be upon him), that he (peace and blessings be upon him) said: "When anyone touches his private part, let him not pray until he performs ablution."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 618
Hadith Gradingمحدثین:صحيح لغيرهٖ
Hadith Takhrij«صحيح لغيرهٖ۔ أخرجه الدار قطني 1/46»