There are 2 people riding in a vehicle. The passenger left his backpack in the vehicle. The driver gets pulled over and the police search the vehicle. The passenger is not in the vehicle but their backpack that he left the day before is. During the police search they find a firearm in the backpack so the driver gets charged with a firearm's offence. The driver didn't know it was in the car or the backpack at all. If the person who owns the backpack says "hey that is my backpack" then does he take credit and responsibility for anything found in that backpack?
It's a backpack. Generally speaking, items can be added and removed to backpacks with ease.
No reasonable person would deduce the owner of the backpack is admitting to knowing the contents of the backpack, and is responsible for all items in the backpack, given the backpack was out of their control.
If it were a portable safe, it may be a different story.
Because of a small detail in the scenario, I will change the object in the pack to "a liter of LSD" (because firearms are not generally illegal in the US, and Eritrea is a 'whatever the government wants to do' regime). Under US legal standards, the passenger could be charged with possession of a controlled substance. Since there is (presumably) no issue regarding what the substance is, or whether it is illegal (including whether the passenger has a license to possess LSD), what remains is whether he "possessed" the substance. He has admitted that the backpack is his (you would need to elaborate the story to explain how this confession was obtained, I assume the confession was not illegally obtained). As you say, the driver allowed the search, so the search itself is legal. The passenger could well be convicted.
The prosecution has to prove all elements defining the crime beyond a reasonable doubt. There will be instructions to the jury explaining what that means, and those instructions vary from jurisdiction to jurisdiction. A simply paraphrase of that standard (which may be encoded in the instructions) is "Does there exist a concrete reason to doubt that the defendant possessed the LSD?" – this is different from asking "Can you imagine an alternative explanation for the presence of he LSD?". Then the passenger-defendant would set forth an argument, and supporting evidence, that the driver put the LSD in the pack. So his fate depends on the strength of the evidence supporting this alternative. (The prosecution can also argue against the alternative, so it comes down to the evidence that supports the various claims being made).
At no point is it required that a person "claim" ownership of the substance, indeed, ownership is irrelevant, the crime is possession.