A former South Carolina sheriff agreed to plead guilty to stealing money from the force’s benevolence fund and taking pain pills that were supposed to be destroyed.