You're right, both a and b could mean either that the journey could end in one hour from now, or that the journey will take one hour regardless of departure time.
a. Can we get to the airport in an hour?
b. He can get to the airport in an hour.
As in a lot of cases you will come across in English, context is everything. An example of duality of meaning I was taught in school was "my father travels to work in a bowler hat", which could mean he wears a hat while travelling, or that the hat is his vehicle. Obviously, the latter is ridiculous, so you wouldn't think that for a moment in a real situation. Likewise, if either of your two statements were said in a conversation, one would hope that the wider context would make it clear what was meant.
There is no ambiguity in c:
He learned to swim in two months.
Because "learned" is in the past tense, this could only have happened in the past. It cannot mean in two month's time. For this sentence to have the same ambiguity as the previous two it would need to match the tense, ie "he can learn to swim in two months".