when do they say 'to have one foot in a grave'?

my teacher(she is from scotland) says we can say that only about old people

but my dictionary(its longman) says that we can use it both way( about very ill and very old)

whats the true?

thanks