Short answer
They are equally safe—or unsafe—in the same way. The primary risk for both fruits is the pit, which contains cyanide precursors and is a choking hazard, and the fuzzy skin of a peach might cause minor mouth irritation. A tiny piece of the flesh from either fruit is generally fine for most cats, but it offers no nutritional benefit and the sugar isn't ideal. The key is to only offer a small bit of peeled flesh, ensure there are no seeds, and watch for any stomach upset afterwards.
Nectarine — Food safety facts
Feed with care · Cats · full breakdown on the linked food page
A piece of flesh is fine. The pit contains cyanide precursors and is a choking hazard.
The full verdict, portion guidance and serving notes are collected on the Nectarine food facts page.