As RythymDoctor mentioned, one could get fired for that sort of thing, but sometimes the urge to tickle is so mind-numbing that it displaces rationality.
Such was the case with me one day, when I walked into my female boss' office during our lunch break. She obviously was not expecting anyone, for she had her shoes off, with her stockinged feet up on her desk. (She had on a pants suit) As soon as I saw her feet, I knew there was no way I would get out of there without trying to tickle them. When I stroked one of her soles with my fingers, she seemed so astounded that she could not react immediately. When she recovered from the initial shock, she shouted, "OK, that's enough!" and jerked her feet away.
My next thought was "Well, I may as well go clean out my desk", but to my surprise, she didn't get angry and didn't admonish me in any way. She merely regained her composure and asked me what I wanted. We never discussed the incident and I never got that brave (or foolish) again.