The yolk sac functions as the first respiratory organ and a digestive organ for the embryo. It also serves as a site for blood cell formation and plays a role in the absorption of nutrients from the yolk.