The 28-year-old, who started his career at Hibernian, was allegedly caught with the Class A drug in Edinburgh during the early hours of Saturday.
O'Connor, from Port Seton, East Lothian, was detained by police, but released without charge pending further examination.
Advertisement
Hide AdAdvertisement
Hide AdThe striker has been training with Celtic after being released by Barnsley.
And on Sunday, officers allegedly caught two Hearts players with an illegal substance.
Ian Black, 26, and Robert Ogleby, 19, were detained on suspicion of possessing a Class A drug and later released.
A spokeswoman for Lothian and Borders Police said: "We had two people detained. Both were cautioned and charged."