Abu Osama could treat women only when they were accompanied by a male relative, and if a female patient lifted her veil before him and Islamic State’s vice squad found out, he would be held accountable.