It does sound like the pain you are experiencing could be from a pulled hamstring, which is essentially a minor injury
to large muscles in the back of the leg caused by over stretching. However, a pulled hamstring usually occurs in the context of vigorous physical activity, so the fact that this happened to you just with very minimal activity (walking around your neighborhood) is unusual. Therefore, I would recommend going to see your regular primary care doctor
. They will be able to examine your leg and knee and help figure out whether this is in fact a pulled muscle or some other injury or condition, potentially involving the knee.
With any musculoskeletal injury, it is usually best to rest until pain, stiffness, and swelling subside. Exercising too soon can worsen the injury or prolong the time it takes for things to heal properly. Your doctor will be the one who is best qualified to tell you whether or not (and when) it is safe to resume dancing. I would suggest making an appointment today. In addition to advice on exercise, your doctor may also be able to prescribe you a medication to help with the pain and swelling that you are experiencing.