The British prime minister said the EU had cast doubt on the Good Friday Agreement after considering invoking Article 16 of the Brexit deal.