The only risks for HIV in adults are:
1) Having unprotected anal or vaginal sex, or
2) sharing intravenous needles with IV drug users.
It isn't possible that you had sex without knowing, and the sex worker also confirmed that you did NOT penetrate her.
If you do not engage in any of the activities I mentioned above with someone HIV+ or whose HIV status is unknown to you, you will NEVER have to worry about getting HIV. There is no information you could add about this event that would make it a risk for HIV.
You had ZERO risk for HIV and you do not need to test.
OCD is OCD. It doesn't matter if it's about HIV or any other subject. Only a therapist can truly address this level of anxiety.