Is it ethical to have two (undergraduate) researchers in the same group "compete" against one another for leadership/credit of a research study?
Let me try with an "onion-answer", one layer at a time.


It is certainly not unethical to have several undergraduate students work on the same project. This is how most people get by, as there are simply not enough interesting and unique projects at undergraduate level that everybody can get their own. (And if there are, it would take too much time developing them.)
It is borderline unethical to set up a competition between students in your lab, dangling the prize of a conference presentation or a publication ahead of them. The focus should be on how to do good research, not how to get ahead of your colleagues - even though it is sometimes also part of research. I can see how this could be done in a somewhat fun and productive atmosphere, so I will not dismiss it off hand. But I would much rather have the students work together, than against each other.
It is blatantly unethical to have a competition among your undergraduate students without informing them, that they are in a competition, first. I assume from your post, that you have never said yes to be in such a competition, and that you in good faith assumed that your chances of getting the "prize" would be based on your performance alone, and not how it compares to the performance of other students. This is a kind of "bait and switch" strategy, also often used for job interviews, where you get a person in the door by promising them a reward - but at the end of the day there is only one reward, and many people competing.


Finally, you mention that part of the prize is also "credit". Here I want to tell you, that if any scientific work is done towards a specific publication as part of the non-winning studies, the authors of said work should be credited as co-authors. Even if they don't win the competition.