You can complete the setup of any Mac with Yosemite installed on it without needing an Apple ID.
- You can't use the Mac App Store for anything but core OS updates (printers, safari, etc...)
- You can't use the iOS App store for music or books or podcasts, but streaming internet radio does work without an Apple ID.
- You can't update the iLife apps that come with a new Mac
- You can't use iCloud or FaceTime or Messages or continuity (aka handoff and instant hotspot)
Other than that, the computer doesn't really care that you haven't chosen to enter a valid Apple ID and password (or any Apple ID at all). I'm not sure how you'll download the Yosemite installer without using an Apple ID, but perhaps that is something you don't mind doing once before installing the upgrade.
As part of the installation you do have to agree to the licensing terms or the installer will not run. If you decide to hack that, it's not clear if there are any ramifications, but that item would be off-topic so if you decline the terms, the upgrade won't run out of the box. You don't need an Apple ID to accept or decline the EULA dialog so those really are separate issues IMO.