I think you have probably misread Ezra chap. 8 because there is nothing in that chapter that would indicate that people not of the Kohanic or Levitical families performed priestly duties. The chapter is very meticulous about listing the genealogies of the priestly and levitical families, and chap. 10 also lists the names of all the priestly families who intermarried with the Babylonians and rendered themselves unfit for Temple service.
Ezra was himself a Kohen and in reestablishing the Temple service he had to determine which families disqualified themselves by corrupting their lineage and which families were fit to serve.
"Ezra was himself a Kohen and in reestablishing the Temple service he had to determine which families disqualified themselves by corrupting their lineage and which families were fit to serve."
A Kohen?