A former Bradford police sergeant has been barred from the profession after he tested positive for cocaine.