This is usually called reported speech or indirect speech depending on what textbook/reference you look at. And the answer is both are correct but depending on the student's level it might be easier to just simplify it to always past.
Bob says 'I am Bob.'
He said his name was/is Bob.
Generally (that Does not mean 100% of the time) it's safe to just 'back-shift' the verb and be done with it. There are numerous irregularities to this though. But I would hold off explaining that to student until they've reached an intermediate level or above.
- For Teachers