She was originally also charged with sexual abuse of a ward, which carries a penalty of up to 15 years in prison.
An indictment filed in April accused Sanchez of having a sexual tryst with an inmate at the federal Metropolitan Detention Center in Brooklyn between October 2005 and February 2006, and then denying it to a federal agent in September 2006.
"I was asked if I had a sexual relationship with the inmate, and I said I had not, when in fact I had a sexual relationship with the inmate," Sanchez, who is married, told U.S. Magistrate Judge Ramon E. Reyes Jr. on Friday. "I knew I was not telling the truth."
Sanchez has resigned from her prison job. She told the judge she was getting "support therapy" from a doctor.