martiangirl,
I'm not going to speak as to whether he is masturbating or cheating, but consider this - when a guys is going through the regular paces of life he tends to think about sex in some way, shape or form every 7 seconds or so. This reality would lead many of us to believe that an erection can certainly occur while a guy sees a good looking women, perhaps in a short dress/skirt or very tight clothing. Add to that, any type of provocative movement, such as bending over or squatting down, could cause the male hormones to run rampant. Does this mean that he is going to run over and molest the woman, most likely not, but for a few seconds or minutes he many fantasize and in that moment could even have some pre-cum form on the tip of his penis and thus potentially leave 'pecker tracks'.
I know that I have noticed the occasional fellow attempting to cover or hide his crotch when I am standing close by, and aside from the possibility that the guy has to pee, I would think that maybe he's got an erection looking at me.
I hope this helps,
Wendy