35-year-old Heidi Clayson, who has no permanent address, sold the crack on February 27.
She is scheduled for sentencing in Cattaraugus County Court on November 25.
An Olean man has been sentenced to a total of five years in state prison for having and selling drugs in the city in separate cases.
Arturo Ross Sr. sold a narcotic drug on February 20 and had cocaine with the intent to sell it on March 16.
He was also sentenced to one year in prison for violating his probation, but that will be served at the same time as the other sentences.