The relevant quote is this on page 15 of the PHB, or here in the basic rules:
When your character gains a level, his or her class often grants additional features, as detailed in the class description.
Nowhere does it mention that it takes any time to gain these features when you level. The only exception is that it explicitly states that leveling increases the hit point maximum. Since 5e defines current hit points and maximum hit points as specific terms, you are right to conclude that the you don't gain your new hit points until you rest. However 5e doesn't make that distinction in the terms of hit dice. Like your proficiency bonus, attribute gains, etc., it takes effect immediately upon leveling.
It is reinforced by the fact that Hit Dice advancement is in its own sentence:
Each time you gain a level, you gain 1 additional Hit Die.
Then the following sentence states:
Roll that Hit Die, add your Constitution modifier to the roll, and add
the total to your hit point maximum.
Which make it a separate point.
Yes, the general rule that can be derived is that it's either-or: Either roll, or pick; not both roll and pick and then choose the best one or some other permutation that includes extra decision steps not described.
D&D 5e is written in "natural language", which is disparaged in some edition-warry parts of the Internet right now, but only means that the game is written so that the most obvious reading is generally going to be the right one, so that the game is understandable to the majority of readers who never read errata or participate in online debates about RAW, RAI, LFQW and other jargon.
In a natural language reading of all these rules, you either pick or roll, not both. If you were meant to do both, it would clearly say that, because not clearly saying that you're supposed to do both would be misunderstood by the majority of readers, if that was the intent. Since it doesn't say to pick and roll and take the best, the normal interpretations of "or" and "alternatively" are in force: either-or.
Extending the general principle of "when the game says to pick or roll, you pick or roll but not both" to other circumstances in the rules is a non-starter, because it just doesn't apply to any rules that it doesn't already apply to.
That principle isn't what your last question assumed would be derived though, so for completeness, let's now address the general rule that it assumes could be derived: that any roll could be instead replaced by taking the average, maybe if you want to save time or reduce randomness.
Extending "take the average" to other parts of the game where it's not mentioned as an option could be done as a house rule. It would probably not break most uses, and would likely find some corner cases where the extra predictability would break things and produce something that is off the average, but you'd have to play with the house rule for a while to find those, as is usual houseruling procedure.
- Off the top of my head, it would definitely break to-hit rolls. If nothing else, this is the clearest counter-evidence to suggest that it could have been meant as a derivable general rule.
- As an example of taking the average producing subtly skewed, non-average results, a wild magic sorcerer who knew that they could take the average damage of a surge effect might end up risking surges more often, thereby producing them more often than they would on average if all the involved rolls were actually rolled.
- Similarly, not rolling for healing means you can attempt to plan farther ahead knowing not only your current resources exactly, but also one step ahead into the future of your resources with reasonable accuracy. This would alter decision-making, skewing play in who-knows what different direction.
Best Answer
The actual class tables in question, like the one on p. 113, say variations on the following:
This suggests you add your CON either way, and is IMO much less ambiguous than the wording in Chapter 1.