I know my cousin did have
Ambien for a couple of nights when she was pregnant - however, she was
in labor already, having a tough time of it and hadn't slept in a few nights, so her situation could be very different from yours since you are not as far along in your pregnancy as she was.
If your OB says it's ok to continue taking the Ambien, definitely do your absolute best to not go above the 10mg - unless your doctor can give you the Ambien CR, which is 12.5 mg.