The Prince of Wales and Duchess of Cornwall visited the Glencree Centre for Peace and Reconciliation, near Dublin, with Ireland's President Michael D Higgins and his wife Sabina Higgins.
Charles was told by school principal Michelle Dolan how important it was for communities on the island of Ireland to be able to move freely, something that could be in doubt if a hard border is imposed if Britain crashes out of the EU without a deal.
Many commentators believe that a hard Irish border due to a no-deal Brexit could become the focus of paramilitary groups and lead to a return to violence.
Mrs Dolan, principal of St Louis Secondary School, an all-girls Catholic institution in Dundalk, close to the Northern Ireland border, had brought some of her pupils to participate in a youth discussion with other schools, including one from the north, about how to foster positive Anglo-Irish relations.
She said after speaking to the prince: "I worked for 12 years in Northern Ireland and then I came across the border and am principal now in a school in the south, the idea of moving across and through the two Irelands is very normal for all of us.
"My concern is that Brexit will cut into that and it wouldn't allow us that freedom, our cousins are there, our neighbours, our friends, our relations.
"It's really important that (the border) stays open and the relations are positive and there's respect and we don't go back to the days of being afraid of each other, and concerned about where people come from and what their agenda might be - we don't want that again."
During a speech at the event Barbara Walshe, the chairwoman of the Glencree Centre, described the joint visit by the prince and president as "deeply moving and deeply symbolic", and a way of celebrating the many links between the UK and Ireland regardless of the "recent fractures" in political relations caused by Brexit.
Charles and Camilla are making their fifth visit to Ireland in as many years, a sign of the closer Anglo-Irish relations ushered in by the Queen's historic state visit in 2011, the first by a British monarch to the Republic.
Among the guests at the centre were former taoiseach Bertie Ahern and ex-first minister of Northern Ireland Peter Robinson and the royal couple had a private meeting with ordinary people who had direct experiences of the Troubles.
Before leaving, the prince and his wife watched a display of traditional Irish dancing by a troupe of women dancers and Charles and the Irish president unveiled a plaque engraved with a poem written by Una O'Higgins O'Malley, the founder of the Glencree Centre, in 2002.
Later, Charles and Camilla were guests of honour at a black-tie dinner staged at the official residence of Britain's ambassador Robin Barnett near Bray in Co Wicklow.
Among the guests were Willie Walsh, chief executive officer of International Airlines Group, 2007 Man Booker Prize winner Anne Enright and Tanaiste Simon Coveney.