Can I replace the dead drive in My Cloud with a duplicate?

Yes there is a procedure you have to follow. Do a search for “unbrick”. You will need to know the firmware version of your My Cloud prior to unbricking to ensure you use the right files to unbrick the new drive.

Here is one unbrick thread:

In the following link I detail the procedure I used to put a new hard drive into a v4.x My Cloud enclosure with may or may not work for others.

https://community.wd.com/t/unbrick-then-firmware-upgrade-equals-no-dashboard/136666/6