This is all true. What happened more specifically is that one fan fiction got really really popular and since people weren’t all that familiar with how novels worked (because there weren’t really any other novels in Europe yet), a lot of people just took this as a valid sequel. Cervantes (the original author) had pretty much stopped working on any kind of sequel to the original at point, but he got really pissed that people were reading this fan fic and assuming it was as legit as his canon. So he got off his butt and wrote this sequel, which academics call big words like “meta-textual” when really it was Cervantes trying to make sure people understood his canon correctly and didn’t get carried away with their silly fan theories based on this one fic writer’s interpretation.
Now-a-days, the “true sequel” is normally just lumped in and stuck onto the end as a “part II,” in case you are wondering why you’ve never heard of a Don Quixote the Sequel. By all accounts, the fan fic was pretty bad, which makes it’s a perfect beginning to the grand tradition of fanfiction.
Calling this the first instance of fanfiction, though, comes from the fact that this was the first time, as far as we know, that the author of the original stepped in to officially denounce fan work as not canon. For most of history (at least western history) there wasn’t really an idea that stories had ownership. Most famous greek plays and poems are based on other works. Virgil’s Aeneid can easily be called Homer fan fiction (we have no real way of knowing how much of the story existed in folk tradition and how much he made up). Most of the versions of greek myths you know come from Ovid’s Metamorphosis, which is largely his short fics about other myths. Moving out of the classical world, bible fic constitutes a lot of what literature is for a while. Dante’s Inferno, specifically, (which is, lets be clear, a self insert fic where the author meets his fave author - so it’s also RPF - and they take a tour through a crossover fic between the Bible, historical fic, and greek myth) was so popular that it’s kind of crossed over into fanon (quick - biblically how many cicles does Hell have? Answer: none, they all come from Dante and in turn Virgil, and eventually Homer…) On the run up to Don Quixote, we have Shakespeare, who adapted most of his plays directly from other works by other people, from which he asked no permission (nor was he expected to.)
The real move that makes this false sequel the first official fan fiction is that the author of the canon material asserted his ownership of the intellectual property that was the characters and the story. Not in the legal sense - there was nothing illegal about this sequel - but in the sense that you could call this sequel “unauthorized.” It’s the beginning of thinking of characters and stories as belonging to a specific person, rather than simply being created by said person.