JERSEY CITY—It’s a high-tech version of the familiar refrain: “Is there a doctor in the house?”

Cities and towns have long relied on volunteers with a medical background to stanch the bleeding or administer CPR until an ambulance arrives. In Jersey City, a nonprofit is investing nearly $2 million to train and equip volunteers to be dispatched to medical emergencies through a smartphone app.

“You...