No chance. Chancres do not occur away from the sites of direct exposure. If there was no direct contact of your ankle with your partner's genitals or mouth, it's not a chancre. Anyway, with only a few exceptions, syphilis is extremely rare in heterosexual men and women in the US.
Any inflammation anywhere on the leg or foot will cause lymph node inflammation in the groin. Some are serious, especially staph and strep. You need to see a health care provider. Do it immediately--and I mean immediately, even if middle of the night--if you develop fever, if you develop rapidly expanding redness around the ankle lesion, if you have a red streak running up your leg, or if the lymph node continues to enlarge.
But don't worry about syphilis or any other STD.
Good luck-- HHH, MD