Is the sentence 'The man was not having any change' grammatically correct? Or does I have to be 'did not have'?
Stative verbs like have, be, love are not ordinarily used in progressive constructions, at least in part because one function of the progressive is to ‘recategorize’ an eventive as a stative and statives are of course already stative. When they are used in the progressive, they have somewhat different meanings:
He's being an idiot does not mean He is an idiot but He's behaving like an idiot.
I'm loving it! does not mean I love it but I am enjoying it greatly.
I'm not having it does not mean I don't have it but I refuse to accept it.
In your sentence have is used in its ordinary sense possess, so it should not be cast in the progressive.
Neither usage is technically incorrect, but they carry slightly different meanings. Almost always, "did not have" is what you intend. A native English speaker would almost never use "was not having", and certainly not in that context.
It is grammatically correct, but it doesn't make logical sense. What is the act of not having any change that this man was engaged in?