Geordi did eventually get the visor changed to ocular implants starting with FC. Which raises a whole other series of questions.
The visor was clearly a security risk, both earlier, in "The Minds Eye", where it was used as a conduit to controlling him as a sleeper assassin, then later in Generations where it was responsible for the loss of the flagship
Another thing I noticed is that the Federation ban is worded to outlaw "permanent" modifications. So, presumably, if the modifications are temporary, that might fly under Federation law.
they do genetic modifications all the time in Trek -- including in the SNW pilot
The Federation thinks the Prime Directive is a cool and possibly the best idea ever. It's safe to say that the Federation doesn't always think twice before codifying a law.
They also empower their captains to set taht law aside when it's the right thing to do. Not to do it lightly, but the sheer number of times we saw Kirk, Picard, Sisko and Janeway breaking the prime directive, just like we know Pike and April have done, shows that the law is the start, not the end.