It is the first time a minister has indicated the UK could leave the customs union, which prevents the country from forming trade deals with other countries because it would have to implement the EU’s common external tariff.