Yes, it is as long as it is medically indicated. However, there exist other techniques such as sperm washing that can allow HIV-infected male patients to have a child via IVF without needing a surrogate.
Read the full article on: Infertility & Surrogacy – What Are the Medical Reasons for Surrogacy? ( 74).