Yes they do know.... My childhood dog Gypsy was a cocker spaniel / husky mix. She was always gentle and loving. At one point though, she began following my aunt around the house (aunt lived with us). There was nowhere my aunt could go and nothing she couldn't do without gypsy following her. At the time my aunt was a smoker and when she would go outside and sit on the back porch stoop (which was very small) to smoke, gypsy would force herself onto the stoop next to my aunt. She did everyday for about two months leading up to the time that my aunt was diganosed with cancer.
She's ok now, but looking back, we still talk about how it was so out of character and obvious at what this great dog was detecting. Makes you wish we could really hear them talk... !