It is the case that you cannot download and install Yosemite if there is evidence that the disk is being used by Time Machine.
Time machine will also give you a warning that it is not wise to use your source disc for backups. however if you are satisfied you do not need these backups
and have a backup on another external disc, you can delete the Backups.backupdb file that is on your source/ internal disc.
Once that is done and you have emptied the Trash then you should be able to install Yosemite.
One other tip that is handy is to save the Yosemite installer file. Download Yosemite as normal from the App Store, once the download is complete you will get
a notification screen asking if you want to continue with the Installation. at this point don't press continue just yet, instead go to your Applications folder
and scroll down till you find Install Yosemite OS X.app, move/copy this file to somewhere else on the internal disc or to the external for safe keeping. Once that is complete you may continue with the install. When the install is complete the Yosemite install .app is deleted from the Applications file, so having a copy kept safe is good to have if you need to reinstall otherwise you will need to download again or use the Internet recovery which takes ages.
make sure you have the latest version of iPhoto installed (9.6.1) before you install (Yosemite installs Photos App and will cause you to think iPhoto is no longer available but you can get it back, check with the iPhoto forums on how to get it back, its relatively easy. Also useful to check if any third party apps you are using
will be compatible with Yosemite, check with the apps developers.
Yosemite looks and feels very different, so be patient as it all works out, use these forums to ask questions, after all in two months time we will
have El Capitan 10.11 to download.