The header does not say whether the bytes pointer can be null when size is zero. It can: btck_witness_stack_get_item_at passes std::vector::data() straight through, and that may be null for an empty element.
An alternative is to guarantee non-null rather than document that it isn't. In other words, route the vector-backed writer calls through a helper that substitutes a valid, never-read pointer when the buffer is empty.