(Not a teacher)
I don't know if there is any rule for this. It is similar to the situation with "the," which is usually "thuh" (schwa) but for emphasis is optionally pronounced "thee." For some reason, "the end" sounds much better with "thee."
In the case of "a," the "uh" pronunciation predominates, but it seems to me either pronunciation is acceptable with any word. Can you give any examples in which the "a" (eh) form is used or normally used?