The bacteria may be found in the blood, but that's not how it's transmitted.
How do people get syphilis?
"Syphilis is transmitted from person to person by direct contact with a syphilitic sore, known as a chancre. Chancres can occur on or around the external genitals, in the vagina, around the anus , or in the rectum, or in or around the mouth. Transmission of syphilis can occur during vaginal, anal, or oral sex. In addition, pregnant women with syphilis can transmit the infection to their unborn child."
https://www.cdc.gov/std/syphilis/stdfact-syphilis-detailed.htm
It sounds like maybe you have obsessive compulsive disorder? This amount of fear over this is not rational.
Yes it can be transmitted, but the chances are really low.
And why are you assuming the red thing is blood?
Why are you assuming the person has syphilis?
If you are worried, get a test, really simple. Syphilis is treatable.
Anyways, good luck and all the best.
I'm not familiar with Chinese dentistry practices, but I'd be very surprised if what you saw was blood. Did you ask about it or point it out to the dentist?
Even if it was blood, you don't need to worry about this. Once exposed to air, blood-borne germs (HIV, Hepatitis B and C) die quickly, and are unable to infect someone. Even if it was fresh blood, it doesn't sound like there was enough to have enough virus to infect your child.
You should let the dentist's office know, though, so in case it is blood, they can clean it and take proper precautions so it doesn't happen again.
Your child is at no risk.