The teacher is mistaken, though they are equivalent in your first two sample sentences.

"I can't see you -- are you here?" is grammatical, but "I can't see you, are you here?" is a comma splice.

"What the --" isn't a complete phrase, but it's acceptable in dialog. "What the," would not be. Similarly, "What the -- oh, there you are" would be acceptable in dialog, but "What the, oh, there you are" would be a mess.

The last sentence, "My friend–Alex, ran to the store," is indeed incorrect. You can set something off with em dashes or commas here, but not one of each.