No, as mentioned a couple of times in this article already, it is not illegal for Swedish players to register at a casino with an MGA license. No laws prohibit you from using overseas casinos at all.
With that said, it is illegal for the casino to operate in the country and target Swedish players. Therefore, most MGA-licensed casinos do not accept Swedish players.