UK PM's comments have been met with concern in the EU and anger in Ireland, which is against a return to a hard border.