Arlene Foster has said Northern Ireland must leave the European Union "on the same terms" as the rest of the UK.