Elves are not the most magically powerful race in Middle Earth
While the question of whether or not they are the most magically powerful native/bodied species of Middle-Earth (i.e. even just among the Elves, Humans, Dwarves and Ents) is debatable, it is not in fact of any point in this question, because Middle-Earth is also home to many Maiar.
Most importantly, Sauron, the being to whom Elves are being compared in this scenario is a Maia - the Tolkien equivalent to angelic beings. And while Maia are not a 'native' species/race of Middle-Earth, many of them undoubtedly live on Middle-Earth. Apart from Sauron, the Balrogs were also fallen Maiar. On the side of the 'Good', we had the Istari who were Maia sent to oppose Sauron. We also know that Melian, the mother of Luthien (and hence an ancestress of Elrond and his kids) was also a Maia, which implies other Maia wandering around on Middle-Earth as well.
Which brings us to the fact that...
The Ring was made by a Maia
First of all, the Elves made their Rings under guidance of Sauron. So Sauron was the guy with the 'master knowledge' about how Rings are created and ins and outs of the magic surrounding them, even if he wasn't directly involved in the making of the Three Rings. There is no reason to assume that Sauron, whose whole plan with the Rings was to subjugate the Elves using these Rings would share everything about the craft/lore honestly and not keep some 'back door' knowledge to himself. In fact, we know that he kept info to himself and crafted the One Ring in secret, explicitly to subjugate the Three - and the only reason he couldn't was because the bearers of the Three found out before he could 'execute his hack' so to say and hid them.
Secondly, not only does he have this back door info, Sauron is a Maia, which means he's a being exponentially more powerful than Elves. There's absolutely no reason to believe that an individual elf, even one as powerful and willful as Galadriel would be immune to Sauron because of her elvishness.