Short answer is yes the virus would be backed up along with all the other content from the PC to the My Cloud.
First and foremost it is important to practice proper and safe web surfing. There are a number of steps one can take to lock down their web browser. Above all avoid porn and similar sites where malware and virus tend to run rampant. One can perform an internet search to find ways to lock down their web browser, email program and their computer.
Antivirus and other security software are ONLY as good as what they are programmed to catch. One must update such programs often to ensure one has the latest definitions for catching viruses/malware. Even then viruses and malware can slip past. One a computer is infected if a backup is performed to the My Cloud then that backup will still contain the virus/malware if that backup was ever restored to the computer. Certain virus/malware programs are designed to scan the local network and infect any devices it finds. They can infect any mapped Shares/drives as well.
The single bay My Cloud does not officially contain a virus/malware scanning module or capability. Depending on the security suite one is using they may be able to scan a mapped My Cloud Share. For example one could scan the Smartware and or TimeMachineBackup Shares on the My Cloud with an anti virus program.
Unofficially it may be possible to install something like ClamAV to the single bay My Cloud using SSH. There is some further discussion on trying to get the My Cloud to run an AV program in the following post/thread:
https://community.wd.com/t/my-cloud-has-been-hacked-and-they-ask-for-money-to-give-my-files-files-back/160154/25