Have a question about the use of "an".

What was taught back then was to only use "an" when the beginning letter of the proceeding word starts with a vowel.

But I read somewhere that if the proceeding word's first character is pronounced with a vowel (e.g. MMDA) you should still use "an" even though it is a consonant.

A MMDA officer apprehended me.

or

An MMDA officer apprehended me.