The dog attacked the cat and its friends.
Does the sentence imply that the dog attacked the cat and the cat's friends, or that it attacked the cat and the dog's friends?
How would one properly construct the sentence for each meaning?
The dog attacked the cat and its friends.
Does the sentence imply that the dog attacked the cat and the cat's friends, or that it attacked the cat and the dog's friends?
How would one properly construct the sentence for each meaning?
This is too ambiguous. It is impossible to tell whose friends its friends are referring to.
its
belonging to or associated with a thing previously mentioned or easily identified.
There are two things mentioned previously in the sentence and both can be identified as the one it is associated with.
To answer the part of your question regarding how to restate the sentence most clearly, I would go with
The dog attacked the cat and the other dogs.
or
The dog attacked the cats.
(I'm not sure why you would need to define any of the animals' "friends")