Not quite -- that only happens if the three teams are all tied with the same record. Since one-game playoffs count in the standings, the loser would end up a half-game behind the Yankees, regardless of who it was, so the Yankees would get the WC no matter what.
If two division rivals end up tied for the division lead and the wild-card lead, they don't play a playoff game, but go to tiebreakers instead. I believe this happened with the Rockies a few years back.