Funny you should ask this as something similar just happened to me. I've noticed that in most things on PC there is usually someone else going through something similar. Ordinarily I don't get urges IN session so I can't speak to that. I am, though, always honest with T about when I have si'd and that, well, i'm not really ready to stop.
Last session though, I apparently did some si'ing that I was unaware of. She pointed it out and I guess watched me as I did it (nothing that could hurt me too bad, at worst maybe break a bone). She watched me, kept pointing it out, asking if I was trying to hurt myself (which I didn't know) and tried to question around what was my purpose in doing it (distraction, etc.) It was weird, but the urge to do it wouldn't go away until she helped me calm down.
I would not suggest si'ing in front of T (especially intentionally), but I also would not suggest hiding it (going to the bathroom). If the urges come up in session, that is the best time/place to express to T that you are having urges and they can, hopefully, get you to the root of the issue that's triggering that response in you. I've always done this thing that I did in T without realizing it, but it happening in session has made me now aware that its actually the first thing I do when I get frustrated, it's just not normally noticable and I'm able to stop it because I "know" what i'm doing.
Try talking to T though, thats what they are there for.