Mexican officer accused of working with cartels