No, Porky Pig saying “Son of a (you know what)” didn’t appear in a theatrical cartoon. It was in a gag reel for studio eyes only.
You no doubt have seen at least part of the 54-second famous cartoon somewhere. Porky bangs his thumb. There are several “takes” for the cartoon with Mel Blanc’s Porky saying “Son of a bih-bih, son of a bih-bih, son of a bih-bih-gun” a couple of times.
Finally, he turns to the audience and says the “b” word.
The feeling is someone in the Hardaway-Dalton unit animated this. The animators in the unit included Herman Cohen, Dick Bickenbach and Gil Turner.