Your concern is valid since sharp tools used by barbers / hairdressers can present risks of transmitting infections as the HIV and hepatitis viruses.
The person who attends barbers must be careful to know if the instruments used are properly sterilized.
When these instruments, like the razor, are effectively sterilized with every use, the person can perform the aesthetic procedures without fear.
This form of transmission is rare to occur in comparison to other possible ones such as unprotected sexual intercourse, sharing of contaminated needles and mother to child.
Read too:
How can HIV transmission occur?
Even so, care must be taken and hygienization and sterilization practices used by the aesthetics professional.
O HIV test is offered free of charge by the Unified Health System (SUS). In case of doubt, look for a Health Unit closer to you.