During the Prohibition in the United States, owning alcohol was permitted, though selling it was prohibited.
If I had a barrel of Vodka which I bought before the prohibition was made law, would I be allowed to sell it to a non-Jew for Pesach (Dina Demalchusa)?