No 10 has said rules allowing EU nationals to live and work freely in the UK will end in the event of a no-deal Brexit at the end of October.