If yibum is only for brothers, why did Ruth seduce Boaz, he wasn't Elimelech's brother?
As Michoel commented, Ramban Genesis 38:8 points this out and calls out Ruth as well; he writes:
והיו נוהגים לישא אשת המת האח או האב או הקרוב מן המשפחה ולא ידענו אם היה המנהג קדמון לפני יהודה... וכאשר באתה התורה ואסרה אשת קצת הקרובים רצה הקב"ה להתיר איסור אשת האח ...
[The Jews of Genesis] would have a brother, father, or other familial relative marry the widow; we don't know if the custom preceded Judah; when the Torah came and prohibited many relatives' wives, God wanted to allow the prohibition of a brother's wife ...
In short -- it was considered a right and good thing to marry any member of the family, unless so closely related as to be prohibited. For the special case of the deceased's brother, the Torah allowed what would otherwise be prohibited, and actively obligated it.
So what's going on in Ruth, as happened with Judah and Tamar, is pseudo-Yibbum. (Backing up -- when Naomi says "even if I gave birth to more sons now" ... a brother not yet born is not subject to actual yibbum.) If I get the family tree correct, the first right went to Ploni Almoni, who was Machlon's uncle; once he refused, it went to Boaz, who was a cousin.
Malbim actually points out that Ruth 4:13 reads: Boaz took Ruth, she became his wife, and they had relations. This means that a full marriage ceremony was needed before relations -- something that wouldn't (at the Biblical level) be required in a true-Yibbum situation either.