When I was working as a paramedic, we did not declare people dead. But we were allowed to decide if we wanted to try and resuscitate them or not.
If resuscitation had already been started by someone else, we were supposed to radio in to the doc in the hospital to report that we were stopping resuscitation attempts. We could do this after the fact. If WE had been the ones to initiate resuscitation ourselves, we were supposed to radio in and get a docs approval to stop resuscitation before actually stopping. But we were also instructed, ... "IF the situation allows". These were our standing orders. I guess technically that last one is not a "standing" order. Standing orders are ones that can be written down. "If you observe A and B and C, then do D". You don't need to radio in and get permission. Example, "If you see a patient in V-Fib on your monitor, defibrillate them". Specific orders are different and require specific permission from a physician, every time. Example: We were allowed to give morphine on our own for "chest pain of suspected cardiac origin" (standing order). But we had to radio in and get specific permission to give that same patient a baby aspirin (call-in order). That always seemed so strange to me, but those were the orders we operated under. I'm sure there was a reason why the physicians wanted it that way, but they never told us why and we chose not to ask and possibly suffer their wrath.
If there was no chance for the victim, even untrained lay people seemed to recognize that. I never ran into any untrained first responders who had started CPR on an obvious corpse.