To provide more details, the heroes in Lucky Bucky in Oz visit Wise Acres, a country club with a membership made up entirely of uncles. Uncle Sam is the president, and he is described as "tall, not fat like the others, and had a tuft of whiskers on the end of his chin." The picture of him that appears on page 226 of the book shows him looking a lot like he does on the military recruitment posters, but without his top hat, and his clothing "not at all star-spangled" (as John Bell puts it in the Nonestica discussion of the book). Bucky immediately recognizes Sam as his own uncle, but does he mean this literally, or simply in the sense that all Americans are metaphorical nephews and nieces of Uncle Sam? We never really find out, although the explanation I've thought up is that it's a little of both. Sam was an uncle of Bucky's who somehow came to Oz, and took on the role of his famous namesake. Since Americans have been prominent in shaping the recent history of Oz, he felt at home there, and decided to stay. Whether Columbia and Brother Jonathan are also hanging around somewhere in Ozma's dominions remains to be seen.
I think the reason why the American symbol shows up in an Oz book might be because it was published in 1942, by which time the United States had fully thrown itself into World War II. The rear dust jacket flap of Lucky Bucky originally included a note attributed to Bucky himself, telling readers to buy war bonds because "[t]he Nazis and Japs are harder to beat than the Gnomes." Sam is never a major character in the story (he doesn't even show up until close to the end), but I think his presence is probably a reflection of wartime patriotism.