Many people only seem to distinguish between 'regular' bread (made with store bought commercial strains of yeast) and sourdough (made with 'wild' yeast). If this is the only distinction - was all bread before 1850 sourdough? Is there no naturally occuring non-sourdough type of yeast?
There are many ways to achieve a “pure” strain of yeast or other microorganisms. Modern technology with sterile environments are today’s method of choice, but another is to create an environment that is especially favorable for one kind and allow this to outcompete all others. The principle is not limited to yeast, another important field is cheese making when the raw cheese is aged in an environment with a specific mold - Roquefort being the classic example. In this case, humans use the already existing colonies in a specific environment or ecological niche.
Even sourdough today works in a similar way, but for sourdough the baker creates a stable mix of yeast(s) and lactobacillae - and by adjusting hydration and temperatures can even regulate acidity and yeast activity.
The earliest bread yeast was a by-product of brewing (hence the name Saccharomyces cerevisiae). And brewers, especially those that brewed on a large scale like monasteries and commercial brewers, carefully guarded and cultivated their yeast strains that had developed over time. The yeast was and is a huge factor for the flavor of the beer. This lead to the first “just yeast” leaveners. You could still obtain some barm from a hobby brewer and give it a try. Ensure that they are brewing with a top-cropping yeast like S. cervisiae, not a bottom-cropping yeast like S. pastorianus.
The main difference between “wild yeast” and sourdough is ratios: you can use for example raisins soaked in water to get a yeast-rich liquid as opposed to a classic sourdough. Elderflower is also rich in wild yeasts. In short, all plants that ferment easily are suitable sources for wild yeast. I doubt that setting up near a tree will have much of an effect.