Ectopic pregnancy

Will an ectopic pregnancy be detected at 5 weeks by ultrasound ?

I am still spotting brown but the thing is I am cramping a lot and a lot of lower back pain the cramps feel a bit strong and I kind of wanted to go to the ER to at least rule out an ectopic I am so worried and it’s giving me so much anxiety I am barely 5 weeks today