Hi, and thanks for writing in.
HIV is passed through blood and body fluid (semen, vaginal fluid and breast milk). This means that it is passed from person to person through sexual contact (vaginal and anal intercourse), or sharing needles to inject intravenous drugs with a person who has HIV. It is not passed through any skin-to-skin contact like touching, massage, or kissing.
If an individual has some irritated or sensitive skin in the anal/rectal area there would still be no concern for HIV transmission with the type of contact you are describing (touch and massage only).
You also might find our Know Your Chances charts helpful in understanding how HIV is passed
Let us know if this does not answer your question or if you have any more questions or concerns.