Are you sure it's not a condition of your probation? Many states have something like the following as a standard condition: "You shall not consume any alcoholic beverage or controlled substance unless legally prescribed by a licensed physician."
But anyway, since you have been ordered to not break any laws, yes, you are in violation.
Are you in a drug court program, or just regular probation?
--I'm a probation officer.