No, state fairs can't bar exhibitors from selling or displaying Confederate flag items
Recent news stories report that Indiana and Kentucky state fairs are barring exhibitors from selling or displaying the Confederate battle flag, or products containing that flag; Ohio seems to have done the same, and other fairs are considering it. But such bans violate the First Amendment.
Government-run fairs are "limited public fora," see Heffron v. ISKCON (1981)), when it comes to the "exhibitors … [who] present their products or views, be they commercial, religious, or political" through the fair. This means the government can impose reasonable content-based restrictions on speech in those places, but not viewpoint-based restrictions. See Christian Legal Society v. Martinez (2010); Cornelius v. NAACP Legal Defense & Educ. Fund (1985). A ban on display or sale of Confederate flag merchandise is based on the viewpoint that many people perceive the Confederate flag to express.
Of course, a fair would be free to exclude the Confederate flag from its own signs and displays. Walker v. Sons of Confederate Veterans (2015) made clear that such viewpoint discrimination—against the Confederate flag or any other speech—is permissible when the government is dictating what is to appear in state-owned designs on state-created items such as license plates that have traditionally been used for government speech. (K-12 schools can also exclude the Confederate flag when it's likely to cause material disruption, but that's because the government has more flexibility in its role as K-12 educator, see Tinker v. Des Moines Indep. Comm. School Dist. (1969).)
But the Court in Walker reaffirms that even speech on government property can still be private speech, as to which the viewpoint-neutrality rule applies. For instance, the Court noted, "advertising space on city buses" is treated as involving private speech on government property; that was labeled a so-called "nonpublic forum" rather than a "limited public forum," but the same viewpoint neutrality rule applies here. Fair booths are at least as much traditional places for private speech, even on public property, as are advertisements on buses. What the Court said in Walker about bus advertising—"the messages were located in a context (advertising space) that is traditionally available for private speech" and "the advertising space, in contrast to license plates, bore no indicia that the speech was owned or conveyed by the government"—is at least equally true for booths rented from a state or county fair.
Nor can the state avoid the problem by demanding that exhibitors enter into contracts promising not to display a Confederate flag. The limited public forum and nonpublic forum doctrine provides that the government may only impose reasonable, viewpoint-neutral restrictions. It can't impose viewpoint-based restrictions, whether by ordinance, rule, or contract. I don't know whether there are court challenges being planned to the fairs' restrictions on Confederate flags, but if such challenges are filed, I think they will prevail.