I’m not sure what dogs can or can not sense, but this video is something. There’s a lot of debate if a dog could show emotion like this, and connect the dots with what is going on. Some say yes, some say no.
Either way, the dog definitely seems distraught once it is standing at the grave of its owner. See for yourself.