Gib is correct:
I think this is what you're getting confused about (in bold below):
Use an in place of a when it precedes a vowel sound, not just a vowel. That means it's "an honor" (the h is silent), but "a UFO" (because it's pronounced yoo eff oh). This confuses people most often with acronyms and other abbreviations: some people think it's wrong to use "an" in front of an abbreviation (like "MRI") because "an" can only go before vowels. Poppy****: the sound is what matters. It's "an MRI," assuming you pronounce it "em ar eye."