How you model your data in Firebase usually depends on how you want to use that data in your app.
In your scenario there's an extra interesting question: is friendship bi-directional by nature? In other words: if dog1 is a friend of dog 2, does that automatically mean that dog2 must be a friend of dog1? If so, you'll want to model it the way I described in Best way to manage Chat channels in Firebase
friendships:
id_dog1-id_dog2: true
id_dog1-id_dog3: true
In addition you'll want to do as you already said: keep a list of friends for each dog.
You'll see that this means you're keeping duplicate data: both a list of friends for each dog and a "master list" of friendships between dogs.
This sort of data duplication is common in NoSQL databases and Firebase is no exception.
Update (for comment)
Data modeling in a NoSQL solution always depends on how you want to use your data. If you want to get a list of friends for a specific dog, you should store a list of friends for each dog.
dogFriends
dog1
dog2: true
dog3: true
dog1
dog1: true
dog3
dog1: true
Now you can easily find out the friends of a specific dog by loading /dogFriends/{dogId}
. Then loop over those results and load the details of each friend.