Do you have the My Cloud Safepoint/Backup feature enabled? If so, and it hasn’t run a newer update yet, you can recover the overwritten file from the Safepoint/Backup location.
If you were using WD Sync one may be able to recover a file using that software’s recovery option.
Otherwise one may be limited to attempting to recover files using Linux file recovery programs since the My Cloud hard drive uses Linux. And to do so may involve shucking (removing) the My Cloud internal hard drive and connecting that hard drive to a computer running Linux. One can try using Mac or Windows recovery programs but they may not work with NAS drives. Plenty of data recovery programs out there.
Generally trying to recover a overwritten file is generally a long shot if the hard drive wrote the new file data to the same sectors at the old file data.
As previously stated, the My Cloud hard drive is formatted for Linux. What ever computer you connect the drive to, the computer’s operating system would have to be able to read Linux formatted (EXT4) partitions. I don’t have a Mac so I don’t know if it can natively read the EXT4 format. For Windows one has to use a third party Linux driver (or use a virtual machine running Linux). Many past discussions on getting Windows to recognize EXT4 partitions. For example:
One easy way is to use a Linux boot disc. Most Linux distro’s can be burned to a CD/DVD or to a USB flash drive and booted. Ubuntu is one such popular Linux distro that can be used to boot a computer.