The UK government could introduce legislation that overrides parts of the Brexit deal.