Liz had been invited to join a Windsor Castle investiture because she wanted to take part in as many photography experiences as possible while she is able.
In a personal message published on social media, the Prince and Princess said: “A pleasure to meet with Liz at Windsor today. A talented young photographer whose creativity and strength has inspired us both.
“Thank you for sharing your photos and story with us. W&C.”
The investiture will appear in the court circular but the meeting will not. It is the first time the Princess has been seen meeting with a cancer patient since she announced she had the disease in March.
The King, who is also having treatment for cancer, has previously visited a hospital chemotherapy ward.
Liz and her family, from Harrogate, were photographed with the Prince and Princess after the investiture, in which Liz was encouraged to take photographs of honour recipients and document the day.
Liz in turn wrote that the Waleses were “such lovely, genuine and kind people. I’m over the moon that my family and I had this experience.”
Her family’s X account wrote: “We cannot thank you both or your incredible team enough for the amazing opportunity you gave Liz or the wonderful day that we have experienced as a family.
“It’s a day none of us will ever forget and we are so very grateful to you all.”
The Prince found out about her mission to fulfil a “photography bucket list” via the London Air Ambulance Charity, of which he is patron.
Liz has been diagnosed with desmoplastic small round cell tumour, which is rare and has no standard path of treatment.
She had visited her GP after experiencing abdominal pain during the Christmas holidays, with doctors discovering she had tumours on both her ovaries and liver. She has since undergone multiple rounds of chemotherapy and dropped her formal studies in favour of following her dream of photography.
Earlier this year, she told the BBC: “If I only have around three years left to live, what’s the point in A-levels?”
After her diagnosis earlier this year, her family posted her wish list on X, including requests for help in making her dream of having her pictures published in UK magazines, photographing the rehearsals of a musical, television show, or film and shooting models for real fashion houses.
It did not include a specific request to work at a palace, but the Prince invited her to experience an investiture, which included sporting recipients Mark Cavendish, Wayne Barnes and Alistair McCoist.
Liz had already received offers to photograph the Royal Marines, West End theatre shows including Wicked and Cabaret, and watched an episode of her favourite TV show Would I Lie To You? being filmed.
Vicky Robayna, her mother, Aaron, her stepfather, and younger brother Mateo joined her at Windsor Castle.
The Princess joined the group following the investiture. She and her family live nearby at Adelaide Cottage.
Since she announced she had finished her course of chemotherapy last month via a video, she has appeared in the court circular twice for meetings, but has not been photographed.