This would take some training, a button around your neck that's designed to be activated by your dog, either a big enough button or they can grab it and pull it.
They already train dogs to sense oncoming episodes of medical emergencies, seems like this would be pretty easy. Yes, they'd have to know
the difference between you just sleeping and passing out and collapsing but I think dogs can be pretty smart, but if you thought it was an issue you might be able to deactivate the pooch button before you go to sleep. I don't think that would be necessary though.
Life Alerts are great if you're still conscious enough to activate them, this would be an extra level of safety for elders who live alone with their dogs. Might be kind of a nice way for owners to bond with their pets too, I think the dog would love it. Having the occasional practice session (with the practice mode engaged obviously) could even be kind of fun for both participants.
Having this around the neck would work where just having a button someplace else in the house wouldn't. The dog would be trained to go through a routine including licking the person's face to see if they could wake them etc. The button would have to be on the person, putting it on the wall would be a waste of time, hence nobody doing it. The dog's also going to be naturally inclined to stay with the victim. Note, the linked system specifically says the one you wear is NOT for the dog to push, quote: "Wrist Pendant for the user to wear when they are able to push a button on their own." Please ignore any obsessed MFD annos saying this is baked, it is not.
I'd also add a camera and mic on the dog's collar so the emergency responders could see the person and maybe even give the dog instructions.