Yoda is often described as having no master, on the grounds that he became the greatest Jedi of his era. But he did train under someone.
That master was N'Kata Del Gormo, a Jedi who instructed a young Yoda and his companion. Yoda's later reputation was built on what he learned there, so the two ideas are not in conflict: he had a teacher and still ended up the most accomplished of them all.