Yeast is not considered to be an STD or anything of the sort, but it is contagious. You can get a yeast infection from skin to skin contact.
Practice good hygiene, make sure to wipe off all sweat, and it really depends on what you mean by "direct contact". Sexually, yes. If you are in sports, lots of people get yeast especially from showers like athlete's foot. If you maintain a healthy body, have good beneficial bacteria inside your stomch then you have a good chance of fighting off the yeast on your own.