Yosemite is only legitimately available from the Mac App Store and to use that you will need to have an Apple ID.
If you have a Mac that already has Yosemite you can create a
Bootable Flash Drive with Yosemite on it, and use that to upgrade your other Mac. However that does require you to enter your Apple ID to download it again, as the installation files as removed after you update.
Not sure why you are concerned about creating an Apple ID as it is free to do so.