I assume you are trying to format sysnand to unlink emunand from sysnand? The best way to do this is to downgrade sysnand to 4.x then format it. Then use a game Super Smash Bros. (or Majora's Mask) to get back to 9.x fw. SSB will take you to 8.1 (though some have reported newer revisions of the game have shipped out with the 9.2 update on them).
The main reason you want to do this is to avoid issues with your NNID. The reason the 3DS wants to connect to the internet is so that it can unlink you NNID from the console when you format. If you allow this to occur in sysnand. THIS WILL BRAKE NNID ACCEESS IN EMUNAND. I do not recommend doing it this way.
If you aren't intending to hold on to your friend code, then do the format in emunand instead. Sysnand not having NNID access is not a big of a issue as it would be in emunand had you lost NNID access in emunand. Either that or downgrade sysnand to 4.x if you still intend to format sysnand. You can backup your CIA installed game saves (legit or pirated, there's no difference in how the saves are handled) using SaveDataFiler. After you format emunand and relink it to you NNID, you can redownload/reinstall your CIAs/Games and then use SaveDataFiler to restore you saves. Yes even your Pokemon saves.
(Cartridge games will not be impacted, so you don't need to backup/restore their saves)
In either case the 3DS won't force you to update the firmware to format. It it does prompt for that, you should be able to cancel it without canceling the format.
Your Pokebank is tied to your NNID. Not your console. So if you unlink it and format, then relink the same NNID you had before, your Pokebank will still work as is. You shouldn't have to buy it again.
You only would have to buy Pokebank again if you were to relink a DIFFERENT NNID to your 3DS. Which in this case isn't what you are doing, so your good to go if you need to unlink and relink your NNID.