Sperm can live up to 5 days in the vagina. Not to mention sonograms can be up to a week off, sometimes even 2 weeks (as it was with me because my cycles are longer). If you're freaking out about her possibly having slept with someone else then you need to confront her and maybe have a DNA test if you think she's being dishonest. Otherwise leave a little room for 1-2 weeks difference in the date.
I think the earlier the ultrasound the more accuate the dates although they can still be off by more than a week in either direction. BTW they cant tell the exact date she got pregnant only an estimated date of delivery based on the growth of baby.
The earlier the sonogram/ultrasound, the more accurate they are supposed to be in dating the baby's age. HOWEVER, I think up to a week leeway might be reasonable but it should be no more than a couple days or a week maximum off.
Can you give us any more details?