Your cited definition is lacking, and actually highlights it by the some of the associated topics: "bona fide occupant, illegal occupancy, lawful occupant".
Merriam-Webster has a better one:
: a person who is using or living in a particular building, apartment, or room
: a person who is in a room, vehicle, etc., at a particular time
Ownership and even tenancy involve a higher level of formalization which would rise to the level of 'resident'... simple occupancy does not.
You do note a key differentiator... occasional vs regular occupancy.
While a visitor would be considered an occupant and not a resident (residency requiring either a pre-existing time spent, or a clear plan to (lease))... at what point does occupancy become residency (assuming we accept the premise that residency is required to be able to consent)?
You invite a girl back to your house for a night... she's an occupant.
She eventually moves in with you... she's a resident.
At what point in between did that status change and she inherited the legal authority to consent to a search of the resident?