Searching for "momentarily expecting" yields some very old uses with the meaning "in a moment".
From The Fast of St. Magdelen, by Anna Maria Porter, 1818, via Google books.
Momentarily expecting the appearance of this person, and winding up her spirit to sustain the rude encounter of probable insult or menace from him, she sat down on her bed, alternately listening to hear whether her enraged gaolers were coming, or ejaculating an agonized appeal to heaven.
And from 1744
... on the 4th we had 10 feet water in our hold, which made our condition very bad, and the dread of death appeared in every face, for we momentarily expected to be swallowed up;
There are lots of instances of "momentarily expect(s/ed/ing)" from the early 1800s with this meaning, so it's been used this way fairly regularly for at least 200 years. In fact, from the following Ngram, the phrase "momentarily expected" has been declining in use, which is very weak evidence for the word "momentarily" shifting in meaning away from the meaning "in a moment".
If you look at old dictionaries and grammars with Google books, you discover that some of them (for example, Chambers's, 1867) say that the word you were supposed to use for this sense of momentarily was momently, but from the above Ngram, it appears that momentarily has always been more popular than momently, even for this meaning.
If you look at Ngrams, you discover that momently was also used for both meanings in the early 1800s:
And from this chasm, with ceaseless turmoil seething,
As if this earth in fast thick pants were breathing,
A mighty fountain momently was forced; —Kubla Khan, Coleridge, 1797.
What I think may have happened was that in the early 1800s, there were two words, momentarily and momently, with essentially the same two meanings (either "in a moment" and "for a moment"). Some prescriptive dictionary writers decided to assign one meaning to momentarily and the other to momently, but it never caught on. To defend the dictionary writers, this difference in meaning is indeed justified etymologically, since momentarily is derived from momentary, meaning for a moment, while momently is derived directly from moment.
The word momently is now effectively gone from the English language, but prescriptive grammarians still say that momentarily should only have the one meaning.