Yes, this is possible and legal in Sweden.
The other way to obtain cheap alcohol is to take a cruise via the island of Åland, which is not in the EU. If you plan to visit Åland, make sure to pick a ferry that actually stops there as opposed to just symbolically tossing out a mooring rope for a few minutes to satisfy the legal requirements.