Absolutely! When I divorced, my ex-husband took two of our dogs and I took one a the cat; when one of the dogs he had ran away, it left the "mother" dog alone all day; he was going to give her to a nice couple out in the country; she was 15 years old.
My vet said she needed to be with people she knew and loved at that age, that the change might kill her; so I took her. I couldn't have lived with myself if she had been lonely in her old age! (And she lived five more years!)
Thanks for relating your experience with your dog. I agree with your take on this. I do understand Mark's stand on legality, but can't agree that the dog should be presented with the possibility of dying with strangers while this is resolved.