It is narrated from Sayyiduna Talq bin Ali (may Allah be pleased with him) that he said: I said: "O Messenger of Allah, I am in prayer and I touch my private part with my hand." He (peace and blessings be upon him) said: "It is only a piece of your own body."
Hadith Referenceالمعجم الكبير للطبراني / باب الطاء / 8203