It seems to me that, in the first case there is no problem at all if he/she never committed to that production, and in the second case that the student with the game conflict overcommitted and has to violate a commitment either way. That is an unfortunate part of growing up as kids learn responsibilities that come with opportunities. I hope that student let you know right away about the conflict to minimize the trouble.
This brings up another issue, though, and one for adults to look at honestly. I am not a fan of what some people call "loyalty" and I call clique. We should not be offended when kids make choices with their time. We should be supporting their choices, and giving them the perspective of hey-thanks-for-the-things-you-gave-us-Break-a-leg-on-what's-next-for-you, and not if-you-don't sit-at-our-lunch-table-every-day-then-you-aren't-welcome-here. That is modeling the wrong behavior. Student life is rife with petty politics; theatre should be a place that accepts everyone and all their dreams. Including dreams that lead them away from us at some point after they arrive. I want kids to feel welcome here, not pressured to stay. No one has a Thespian wedding ring, and shouldn't be flirting with other activities.
I suggest giving them both hugs, thanking them for what they have given, and showing all your students that loving each other is paramount. Love is not conditional on doing that I want, even if, especially if, I REALLY needed her/him in that show.