In the TX IPC book the word substance is defined essentially to mean a
"pure" compound or element. I do not remember having encountered this
definition, and the dictionary is no help here.
I personally think this is one particular author's definition, or possibly a
definition pushed to be able to ask questions like "Is milk a substance?".
Since there are alternate words which do have traditional definitions, this
is a vey unnecessary complication.
Would anyone agree with the book definition? This is in the "chemistry"
part of the text, so would a chemist agree with this? I would use "pure
substance" as the opposite to a mixture, solution...
Language is messy, but we don't have to burden students with unnecessary
definitions. If the vast majority agrees with the book definition, then it
is reasonable, but merely unnecessary.