You can pull a tendon for various reasons even if everything is set up properly. It could be just one off incident. Just give it some time to heal: ice and compression helps and some Ibuprofen to stop any inflammation. Unless it's swollen and hurts so badly you can't walk easily I wouldn't see a doctor yet.
A very gentle stretching before riding might help, nothing too strenuous though, although I don't bother. Riding gently at first is enough stretching for me. And keep those tendons warm during riding to prevent injury.