When three people eat bread together, they are required to recite the introductory Zimun before Birkat Ha’mazon. The Shulhan Aruch writes that it is a Misva to try to arrange that a Zimun will be required. This means that if two people eat together, it is a Misva for them to try to find a third person to join them so they can recite a Zimun.
Of course, in such a case, this third individual must also eat. In order for a Zimun to be recited, it does not suffice for the third person to be present; he must also eat.
There is a disagreement among the Halachic authorities as to what this third person must eat for a Zimun to be recited. The Shulhan Aruch writes that this third individual must eat bread, but the Rama (Rav Moshe Isserles of Cracow, 1530-1572) maintained that he may eat other foods, as well, such as fruits, vegetables or "Mezonot" foods, or even drink a cup of wine. The Mishna Berura (Rav Yisrael Meir Kagan of Radin, 1839-1933) cites numerous other Poskim who followed this view. And, the Keneset Ha’gedola (Rav Haim Benbenishti, Turkey, 1603-1673) writes that it was customary in his time to give the third fellow other foods – such as vegetables or "Mezonot" food – so a Zimun could be recited.
Although this was not the position of the Shulhan Aruch, nevertheless, Hacham Ovadia Yosef (both in Yehaveh Da’at, vol. 4, and in Halichot Olam) asserted that nowadays, even the Shulhan Aruch would allow the third individual to eat other foods. He explained that in earlier generations, when a Zimun was conducted, the one who led the Zimun also recited Birkat Ha’mazon aloud on behalf of the others. The leader’s role was not only to lead the Zimun, but also to be the only one in the group reciting Birkat Ha’mazon, while the others fulfilled their obligation by listening attentively to his recitation. Nowadays, of course, the accepted custom is for each individual to personally recite Birkat Ha’mazon, and today one may not fulfill the obligation of Birkat Ha’mazon by listening to its recitation by another person. Hacham Ovadia thus proposed that it was only in earlier generations, when a Zimun meant that only one person would recite Birkat Ha’mazon on behalf of the entire group, that three people needed to eat bread for a Zimun to take place. Nowadays, however, when a Zimun entails only the introduction to Birkat Ha’mazon, it suffices for the third individual to have eaten any food (or to have drunk wine), and he does not need to eat bread.
Therefore, if two people ate together, they should try to find a third person and feed him any food, so a Zimun can be recited. One of the two who ate bread should recite the Zimun, after which those two recite Birkat Ha’mazon, and the third recites the appropriate Beracha Aharona.
Summary: If two people ate bread together, they should, if possible, try to find a third person to join them so they can recite a Zimun. The third person does not have to eat bread to warrant a Zimun; it suffices for him to eat other foods or drink wine.