Officials and policymakers say direct-to-consumer drug advertising encourages patients to seek treatments they don’t need and raises heath care costs, but the true picture is more nuanced.