These constructions are what is known to be conditionals.
When you want to predict the result of a future action, you invoke the first conditional. (Your second sentence.)
Note that the modals may, might and could can be used instead of will in the result clause, so your sentence can also be written as If you ask, I may/might/could follow.
On a decreasing percentage, the predictions are shown as follows:
will → will probably → could, may, might
100% 90% 70%
→ may/might not → probably won't → won't
40% 10% 0%
The second conditional (first sentence) is used to talk about situations that are unlikely or unreal. It can refer to the present or the future, so the sentence If you asked, I'd follow, refers to an unreal situation in the present.