If someone has herpes and it is not genital, and they do not have an outbreak at the time, can they have sex?

It depends... ...on meaning of "not genital". If oral herpes (cold sores), there is little risk if no outbreak, and only by contact with the infected person's mouth. But if herpes due to HSV2 is near the genitals (e.g. anal, buttocks, etc), then it should be assumed the virus is often present in the genital area even without outbreaks. Transmission risk can be lowered by taking anti-herpes, e.g. valacyclovir.