Pay close attention to the words and what they are referring to here:
1 Samuel 1:1
There was a certain man of Ramathaim-zophim of the hill country of Ephraim whose name was Elkanah the son of Jeroham, son of Elihu, son of Tohu, son of Zuph, an Ephrathite.
Samuel, and even his father, were not Ephrathites, for Ephrathites were generally Judahites. Zuph was the Ephrathite. Samuel is neither Ephrathite nor Ephraimite, though he did live in the hill country of Ephraim.
Samuel was a Levite.
1 Chronicles 6:27,28
27 Eliab his son, Jeroham his son, Elkanah his son.
28 The sons of Samuel: Joel his firstborn, the second Abijah
Being a Levite explains why he was in Ephraim since the Levites lived throughout Israel. Also, if we read further back in Samuel's heritage we see he is a Kohathite. Which ties it all together:
5 And the rest of the Kohathites received by lot from the clans of the tribe of Ephraim, from the tribe of Dan and the half-tribe of Manasseh, ten cities.
So we see that Samuel is a Kohathite, of the tribe of Levi, living in a Levite city in the hill country of Ephraim.
But what is an Ephrathite?
Caleb, of the tribe of Judah, had a son who apparently settled Ephratha.
1 Chronicles 2:50
50 These were the descendants of Caleb. The sonsfn of Hur the firstborn of Ephrathah: Shobal the father of Kiriath-jearim,
Ephratha is also synonymous with Bethlehem, though it is usually used more in the sense of the region around Bethlehem.
2 But you, O Bethlehem Ephrathah,
who are too little to be among the clans of Judah
It is probably in this sense that Zuph was an Ephrathite, that is, he simply lived in that region. Like one who lives in New York is a New Yorker even if they are African American or Italian.
So was Samuel a priest?
Absolutely yes, or at least, he could have been. He was to be a priest first, trained by Eli. But when God spoke to him and delivered a prophecy against Eli and his family, then Samuel became a prophet.
He could not be the high priest at the Tabernacle or the Ark of the Covenant, which was at Shiloh, since he was not of Aaronic lineage, but he could be a lesser priest.
However, the Ark was taken at the same time that Eli and his sons died and when it was returned it was put under the control of the descendants of Eleazar. So Samuel never was put in that role.
It is possible he was seen as adopted by Eli. This, combined with his Levite heritage, would have settled any questions regarding offering sacrifices.
Samuel took the role of Judge after the return of the Ark as well. So while he was qualified to sacrifice and was given prophecies at times, his other role was as a Judge.
1 Samuel 7:17
17 Then he would return to Ramah, for his home was there, and there also he judged Israel. And he built there an altar to the LORD.
Ramah is in the hill country of Ephraim.
There are many cases of non-priests making sacrifices and offerings on altars. They are usually at least prophets, such as Elijah, or Judges, such as Gideon. But some are neither, such as Samson's parents, though they did it at the behest of an angel.
The rules for only Aaronic priests were specific to the Sanctuary and the Ark
1 So the LORD said to Aaron, “You and your sons and your father’s house with you shall bear iniquity connected with the sanctuary, and you and your sons with you shall bear iniquity connected with your priesthood.
2 And with you bring your brothers also, the tribe of Levi, the tribe of your father, that they may join you and minister to you while you and your sons with you are before the tent of the testimony.
This chart and the site it is from has a lot of great info on the Levites: