a) you may use WD MyCloud as a NAS and create Windows Share on it, of course you can put Xampp on that WIndows Share and run it from one of your PCs (the NAS is only a remote storage)
b) you CANNOT install Xampp onto the internal storage (like the pre-installed operating system / firmware), as Xampp requires an Intel CPU architecture, but WD MyCloud runs on ARM Cortex CPU with a proprietary Operating System.
I think, WD MyCloud already comes with a pre-installed kind of LAMPP (i.e. not Xampp, but a collection of Apache, PHP, MySQL etc. especially build for the given hardware and OS). You cannot replace that by Xampp.