It's hard to make a decent guess without examining and talking to your face to face, as there's lots of questions to ask, but you're seeing a doc anyway which is the right thing to do.
If the pain gets worse when riding, maybe try bar ends, as the different hand position may help. Also definitely sort the saddle out, and make sure your bike fits properly, you might have to raise the stem as well, or the bike may be too small.
Do you only get pain in that muscle, or other fingers as well? When did it start, and can you think of a particular trigger? Have you noticed any change in sensation of the hand? Have you noticed any change in strength of the muscles/grip in the hand (fingers or thumb?
It's a little odd, as that muscle is often innervated by two nerves- the median and the ulnar, and they take a slightly different route. The median causes carpal tunnel, but the ulnar doesn't run exactly the same way. But yeah, check with your doctor