You asked if 10 ilvl difference could explain the different ranking, not how much difference it provides. That is a different question, especially in this context. To be fair, it could be said the difference is mostly academic, depending on your goals and perspective.
However, the important part is that you should not be looking at item level. You are focused on the wrong variable. You cannot boil down quality of your gear to average item level for a number of reasons.
First of all, as others mentioned, there are sockets, trinket effects, and azerite traits. For a taste, go to bloodmallet, and check the difference between best and worst trinkets and traits.
Secondly, average item level is a poor representation of even primary stats like intellect. It is an average after all, but different slots contribute differently to your damage. Head has more stat budget than shoulders, for example, so the same item level difference will provide more stats and more damage. Weapon has disproportionate amount of intellect. Trinkets’ effects can be game changing.
On top of all that, there is so much more to a single encounter than gear alone. There are procs, there are crits, there is personal variation in execution of the rotation. Go to warcraftlogs, view statistics for some boss, and then check how dps of a spec changes between 20th and 80th percentile even if you narrow it down to just 3 different possible item levels. For mythic Grong and mages in 403-405 item level range that’s over 3k DPS difference alone.
That of course means that yes, the gear difference could explain different rankings, easily. Even if you had the same item level, the difference in itemisation could explain the difference in ranking. And if you used that to justify to yourself how you don’t have room to improve and it was really just down to gear, you would still be lying to yourself, especially if you told yourself you just need more item level. Nobody wants to be part of such a lie, which is why we write more than a simple “yes.”
It is more likely that difference in dps (especially if it was as huge as 6k, although it’s relative ratios that are better for judging things like that rather than absolute numbers) was caused by difference in handling mechanics (or being targetted by mechanics). If you need to ask these questions and don’t even know about simming, you are far more likely to have a lot more of room for improvement in how you handle the spec and the fight than in terms of gear. Gear only amplifies that, and you can use it to narrow the gap.
For example, if you check different item level ranges on that mythic Grong stats, 10 item levels wouldn’t be enough to generate a 6k dps difference. (It’s more like 3k, at that level of play and gear.)