I'm scared of taking a dump at my friends apartment
Why are you scared about that?
I'm scared of my friend's dog
I don't think you have to be scared of the dog, he's not going to bother you in the bathroom.
You can't promise that though, he might try.
Maybe talk to your friend about this. If you are scared of the dog where it is at, you could always tell them to move it. Being scared is okay, but it is good to find a solution to what makes you scared.