Welling up reading these stories
When our labrador died, about 11 years ago now, he was 13, and had to have an operation, so my granddad took him to the vet. The vet, while there, decided poor Ben wouldn't survive the procedure, and my granddad made the decision to have him put down.
I was very upset, as obviously, I thought he'd be coming back again after the operation. I think I was about 9 at the time, maybe a couple of years younger, I'm not so sure. I did feel like I didn't get the chance to say goodbye, but I understand the decision had to be made for his benefit.
Around that age, I also saw a lady, while we were at the vet's, slide onto the floor and cuddle her dog, after it'd been put down, in that final phase, it was a very sad thing to see as a child, but that woman loved her dog so much, she wanted the dog to know she was there right to the end, and when Ben was put down, it gave me some comfort that there was a family member there with him at the end.
Tell your DD the truth, and let her make the decision as to what she wants to do.