In many cases, visitations ARE allowed during inpatient rehab. These visits are often restricted within the first week so the patient can get acclimated, work through detoxing, and adjust to their new living situation.
Be sure to check with any rehab center that you are considering to find about their individual policies about visitation.