I don’t think it’s allowed other than if you get a permit for back country camping.
Yip, me and a mate turned up one day with our $9 walmart tent and tried to get into one of the campsites only to find it was full (mid summer) so had to wild camp outside the park, but got a space early next morning. Its busy, but doesn’t take much to get away from the maddening crowds who tend to stick to the valley floor.
We were way underprepared for the terrain, and amused everybody in the hikers bus by getting on wearing just shorts, t-shirts and flip flops for a hike from the Tioga road to the top of Yosemite falls and down to the valley, didn’t see a single person until the top of the falls, which was worrying given our lack of kit and supplies, very fun though as we were within spitting distance of a bear and her cubs at one point.
Second time I went I stayed with the missus in the Curry village tents, this was early October, just as the first snow arrived so pretty cold.
Amazing place, would love to go back!