I don't want to creep you out but I'm sure what you saw was the spirit of your friends dog.
I have been having something simular happening here. We had a dog that my family and cats were very close to, she was like one of the family. She died about 18 months ago from the food poisoning that happened to so many people across the United States. Because of the poison she had a strange oder that drove me up a wall, I was forever bathing her and spraying doggie deodorant on her but nothing seemed to help.
Every once in awhile my cats will start acting up and stairing and rubbing on something on the floor but we can't see anything there. But every time that happens I suddenly smell that strange oder that was on our dog, Journey. Sometimes the smell is so strong that I know she is next to me. Then it suddenly just goes away until the cats see her again.