O'Brien's rank was so mis-handled over the years
Less "over the years, and more "initially."
But "initially" lasted for years.
The only time O'Brien's rank was seriously mishandled was in "Where Silence Has Lease," the second episode of the second season.
In "Encounter at Farpoint" O'Brien wears a single pip, but isn't referred to by rank.
In "The Child" he begins wearing two pips.
In "Where Silence Has Lease" Riker refers to O'Brien as "Lieutenant." I believe this is the sole time
he is verbally referred to as a officer.
In "Family" O'Brien is wearing two pips and is direct referred to as being a "Chief Petty Officer." It is subsequently made abundantly clear that O'Brien is in fact a non-commissioned officer.
So merely having collar pips does not automatically mean that the person is a officer, O'Brien while wearing two pips
is clearly a non-commissioned officer.