That is the taught mechanic. It's kind or redundant, since a foul ball can never be an Infield Fly. Even if the umpire doesn't say, "If Fair", and just goes ahead and calls the Infield Fly, it's still just a foul ball if it becomes foul.
We're taught to say, "If fair", more as a courtesy to the players and to stem off any potentail confusion. It doesn't change the rule at all. If it stays fair, the batter's out, if it goes foul, she's not.