OK Campers (and day hikers!). A few things here. First, there's several sets of regulations that cover what you can & can't do in a national park or forest. First is the Code of Federal Regulations (CFR). There's a bunch of chapters that cover most everything. Title 36 deals with all things park & forest specific (though all titles apply to all federal jurisdictions but Title 36 is just narrower in scope). The other set of regs is a Superintendent's Compendium. This is authorized by Title 36 to cover needs specific to individual parks. So Yosemite has one that's different from, say, Sequoia Kings.
The discussion here is whether it's OK to hike with basic overnight gear for safety (e.g. to bivvy if you get delayed). Technically, this seems to be prohibted without a permit under the Yosemite Superintendent's Compendium:
With the exception of people on big wall climbs, all persons who wish to
sleep overnight, camp, bivouac, or are in possession of equipment designed
for overnight use in the wilderness/backcountry, must obtain and carry with
them at all times a wilderness permit...
Semi-related is Sequoia Kings:
All persons remaining overnight in areas managed as wilderness (on foot or with
stock) must possess a valid Wilderness Use Permit
So as far as enforcement goes, a person could be cited in Yosemite if the ranger interprets what you're carrying as "equipment designed for overnight use..." . So the mere possession of gear is enough as an element to show a violation. The calmer and gentler Superintendent of Sequoia Kings, though, actually wants to see evidence that you camped "...remaining overnight."
I don't know if Yosemite's has ever been challenged. Probably not if it's still there. These are updated every couple of years and if a magistrate or judge has said that's wrong to enforce, then it would be yanked (and any regulation has to be based on authority from the relevant section or title of the CFR).
But, although interesting and worth pursuing, this is really a tempest in a teapot as others have commented. I can't speak for Yosemite but I doubt it's enforced if you're clearly on a day hike and have light bivvy gear and a good story (not to knock my current ranger buddies in Yosemite, though, but there's a tendency there to be not quite as mellow as their colleagues to the south in Sequoia...).
That said, In Sequoia Kings I have cited a (very) few people with full packs and no permit without actually seeing them camp. I broadly figured intent was enough though I suspect that wouldn't be enough in an actual court case. But, heck, they knew and I knew they were camping.
Most all of this stuff comes down to officer discretion which is just showing you have a logical explanation that doesn't have the intent of violating the underlying principle of camping without a permit. Overall, I wouldn't worry much about it.