Muwatta Malik, Book 2, Hadith 61 (USC-MSA)

Yahya related to me from Malik from Ismail ibn Muhammad ibn Sad ibn Abi Waqqas that Musab ibn Sad ibn Abi Waqqas said, "I was holding the Book for Sad ibn Abi Waqqas and I rubbed myself. Sad said, 'Did you touch your penis?' I replied, 'Yes,' and he said, 'Get up and do wudu.' So I got up and did wudu and then returned."

وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ إِسْمَاعِيلَ بْنِ مُحَمَّدِ بْنِ سَعْدِ بْنِ أَبِي وَقَّاصٍ، عَنْ مُصْعَبِ بْنِ سَعْدِ بْنِ أَبِي وَقَّاصٍ، أَنَّهُ قَالَ كُنْتُ أُمْسِكُ الْمُصْحَفَ عَلَى سَعْدِ بْنِ أَبِي وَقَّاصٍ فَاحْتَكَكْتُ فَقَالَ سَعْدٌ لَعَلَّكَ مَسِسْتَ ذَكَرَكَ قَالَ فَقُلْتُ نَعَمْ ‏.‏ فَقَالَ قُمْ فَتَوَضَّأْ فَقُمْتُ فَتَوَضَّأْتُ ثُمَّ رَجَعْتُ ‏.‏

sunnah.com

also referenced under: Book 2, Hadith 91 (In-Book)