Is there a way to access a page's package from a component design for a component on the page? I have a page template with some TBBs to push several page-related fields onto the package. Later in the page template, I render component presentations. In the corresponding component designs, I would like to access some of the fields pushed onto the page template's package.
A way to pass variables across template scopes of the same rendering session is via Context Variables hash map. See Tridion docs for usage.
A mix of concerns is a caveat to consider here. So this kind of approach, my opinion, is tough on maintenance and not ideal.
Note, using this approach you will not be able to debug your CTs in Template Builder because there is no page available. So your CT will just crash when it will try to use those variables.
Perhaps to better separate concerns and make it look a bit more explicit on what's going on, have your TBB on the CT pulling what it needs from the Page, or use default values or throw exception if not-found in the TemplateBuilder context. This way when debugging the CT you'll explicitly see what the TBB that pulls the Page data is doing, as opposed to guessing why a DWT is crashing.
A couple of other Q&As have similar suggestions:
Because the page and the component presentations are separate render operations they each have their own package; as such variables pushed into the package in the page template are not visible or accessible to the component template (as it has it's own package; the same applies to sibling component templates rendered on the same page).
What you are looking for is called Context Variables and they are described in Nickoli's last link.
If you are just looking for accessing the Page item from the component template you can get it via
Page page = engine.PublishingContext.RenderContext.ContextItem as Page;
assuming it's a statically embedded component presentation and not a purely dynamic one of course (in which case ContextItem is always null).