Sometimes dads might sit on their child's bed while talking to them. But when a dad lies 'in' their daughter's bed, that's a bit creepy, isn't it? I think you were right to ask where your mom was. There's no reason why he should have been yelling at you.
I want you to talk to your mother about that event. Tell her exactly what happened and that you were scared. She shouldn't be cross with you. I'm expecting her to talk with your dad and tell him that was no way to behave, and that he should stay out of your room. All kids need their privacy and their 'safe space,' which should be your bedroom.
I don't know what your father was thinking, but I'm proud of you for spotting the problem. Now talk to your mother and if she's not able to tell him to stay out of your room, talk with your grandparents or other relatives who might be able to speak with him and tell him that it is not appropriate for dads to go into their daughter's bedrooms, and especially not their beds.
If your father comes into your bedroom again, you should leave it. Just walk out the door. And, if you father scares you, I think you should be asking your mother not to leave you girls at home alone with him. If she's going shopping, she should take you kids with her. It is better to avoid any future conflict if you can.