If your duplicate photos have been synced to iCloud, then deleting them on your device will delete them on iCloud as well. If don’t want that for some reason, disable iCloud for Photos before deleting anything.