All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Tawaf is not invalidated by a mere incident of the erection of one's penis or stimulation of his desire. This is not one of the invalidators of the tawaf as long as no pre-seminal fluid or semen comes out. If any of these discharges comes out, then the person's ritual purity is invalidated and he should leave the tawaf and purify himself.
Allaah Knows best.