Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:654Abū Bakr > ʿAlī > ʿAbdullāh b. Muḥammad b. ʿAbd al-ʿAzīz > Khalaf b. Hishām > Ḥammād b. Zayd > Hishām b. ʿUrwah

[Machine] My father used to say that if his penis, testicles, or anus touched something, he wouldn't pray until he performed ablution. This is narrated from Hisham ibn Urwah from another perspective, which is unreliable. The correct narration is from Urwah himself. The analogy is that there is no requirement for ablution if the touch is during sexual intercourse, but we still follow the Sunnah in affirming ablution for touching the genitals, and it is not obligatory for anything else.  

البيهقي:٦٥٤وَأَخْبَرَنَا أَبُو بَكْرٍ ثنا عَلِيٌّ ثنا عَبْدُ اللهِ بْنُ مُحَمَّدِ بْنِ عَبْدِ الْعَزِيزِ ثنا خَلَفُ بْنُ هِشَامٍ ثنا حَمَّادُ بْنُ زَيْدٍ عَنْ هِشَامِ بْنِ عُرْوَةَ قَالَ

كَانَ أَبِي يَقُولُ إِذَا مَسَّ رِفْغَهُ أَوْ أُنْثَيَيْهِ أَوْ فَرْجَهُ فَلَا يُصَلِّي حَتَّى يَتَوَضَّأَ وَرُوِيَ ذَلِكَ عَنْ هِشَامِ بْنِ عُرْوَةَ مِنْ وَجْهٍ آخَرَ مُدْرَجًا فِي الْحَدِيثِ وَهُوَ وَهْمٌ وَالصَّوَابُ أَنَّهُ مِنْ قَوْلِ عُرْوَةَ وَالْقِيَاسُ أَنْ لَا وُضُوءَ فِي الْمَسِّ وَإِنَّمَا اتَّبَعْنَا السُّنَّةَ فِي إِيجَابِهِ بِمَسِّ الْفَرْجِ فَلَا يَجِبُ بِغَيْرِهِ