Although the probability is low, if the rubbing of genitals is direct, i.e., without underwear, contagion is possible, provided that there has been contact of sexual or blood fluids even though there has been no penetration.
Read the full article on: Where is HIV transmitted, and are HIV and AIDS the same? ( 76).

Andrea Rodrigo
B.Sc., M.Sc.
Bachelor's Degree in Biotechnology from the Polytechnic University of Valencia. Master's Degree in Biotechnology of Human Assisted Reproduction from the University of Valencia along with the Valencian Infertility Institute (IVI). Postgraduate course in Medical Genetics.