It just occurred to me that if I install a ductless heat pump to cool the air in my house's bedrooms in the summer, the unit will be cooling and dehumidifying the air - but not introducing any new oxygen. The window will also be closed. If I spend a few hours in one of the rooms, is there a significant chance of CO2 buildup which could cause malaise and tiredness? The bedrooms are relatively small, about 3 metres by 2 metres each.
Your house is not a space-ship, and it's not built like a space-ship.
If it's built anywhere close to a spaceship, you can run continuous ventilation fans, typically though an air-air heat exchanger. If it's of "normal construction" normal leakage will take care of adequate air exchange.
If you are adequately curious you can have a "blower door test" done to determine the actual leakage rate of your house under controlled conditions, which might inform both sealing particular leakage areas and the decision of whether or not to install active ventilation.
There are two separate issues with any HVAC system and carbon dioxide (CO2):
This is a concern with a system that burns oil, gas, coal, wood or anything else. There are specific requirements for ductwork in order to make sure it is not a problem. This does not apply to any electric system, including a typical HVAC system when cooling and a heat pump whether heating or cooling.
Humans inhale air including oxygen and exhale air including CO2. In a spaceship, this is a real concern because it must be sealed really well to prevent loss of air pressure, so CO2 will build up over time unless removed from the air through some mechanism.
However, a house on Earth is generally not sealed to an extent that normal usage, without additional CO2 from fuel combustion (furnace, gas cooking appliances, fireplaces, etc.), will not usually be a problem. It could be a problem in a well-sealed room, but even a room without windows will generally have some fresh air coming in from around the door, holes in the wall around receptacles, etc.
This indicates that while the gaps around a bedroom door provide enough ventilation to prevent a dangerous situation from occurring, they do not provide enough ventilation to equalize the CO2 level between the bedroom and the rest of the house when sleeping, and the difference is large enough to cause perceptible differences in next-day performance.
Note that you don't need to ventilate between the bedroom and outdoors, but can ventilate between the bedroom and the rest of the house; there's enough leakage in a normal house that CO2 buildup is not a concern, just not within the confines of a bedroom. Leaving the bedroom door open a crack should be enough to equalize CO2 levels while inside.