Scottish terrier loosing LOTS of hair on lower back

Emilee

My dog is 7 years old and she recently has been loosing a lot of hair around her lower back at first we thought it was her food and we switched it and she got better but then if got worse. And we don’t know what it is, my mom thought it was Scabies but I heard that was highly contagious and my dog sleeps with me every night and I haven’t gotten it yet. So doesn’t anyone hear have any idea what it could be?