This is totally possible - and apparently can happen without someone knowing (though a gun in a fold somehow seems like it might be more intentional - or at least something that the individual would be more inclined to remember - than some food, etc.).
I find it hard to place serious blame on the officers, but they do have a job to do, and will likely be chewed out by their superiors.
For another real example:
My dad's an anesthesiologist, and experienced a related incident. He was in the recovery room, tending to a rather massive female patient immediately following her surgery. As some staff were maneuvering her (I believe she was being transferred from one bed/gurney to the other), a remote control fell onto the mattress from somewhere in her back. In her groggy state, she stated "Oh, I've been looking for that". It was the one from her home, too, because the remotes for the TVs in the hospital's rooms are integrated/tethered to the beds.
Now, she was supposed to have been thoroughly cleaned/sterilized in preparation for her surgery, and this was somehow overlooked.
When the goal is to achieve that sort of cleanliness, as opposed to prevent the entry of contraband into the environment, I find the lapse in the hospital less excusable than that in the jail.