If you already have a Yosemite installer or have downloaded it in the past on another computer using your App Store account, you should be able to do it. If not, you'll have to find one - or, clone or Time Machine restore from your Yosemite computer (if you have one, which it sounds like you do).
If you don't have easy access to a Yosemite installer, if you don't keep a backup (or two, or three ...), it will be that much harder to restore if the disk crashes. Also, if you use Safari, you'll need to be mindful that at some point, the latest version will no longer work in Yosemite at which point you may want to stop using Safari because security updates will likely stop being issued (the current version of Safari is 10, which does work in Yosemite). As a guide, for Safari 9, the last version that works with Mavericks, the last security update was Sept. 1, 2016. The next macOS, High Sierra, is due out in the fall at which point Yosemite will be 3 versions behind it so you should also pay attention to when Apple stops issuing security updates for Yosemite and make sure you're adequately prepared (mainly being careful).