Giving a Professor a Gift After They Inadvertently Suggested I Do So
You are probably overthinking it. I guess the intent of the professor's comment was really, "It isn't necessary, but at the outer limits, something of inconsequential monetary value". 

Would you consider giving a gift to the professor in other circumstances, not related to academia? If not, then it isn't needed here. Express thanks in an email or with a greeting card (again, the outside limits). 

There is one sort of gift, however, that is appreciated in some circumstances. If the student comes from a different country, especially one with a different culture, then a small token from that place might be treasured. Something that might be picked up at a tourist kiosk, say. I've accepted and retained a few of these. They have almost no monetary value, but represent a connection that the student values. I can see one of them, now, from where I sit. 

I once went out for lunch with a bunch of students from a foreign land. They wanted to buy my lunch. I thought it more appropriate that I pay for their lunch. But sometimes you have to accept something because the gift is heartfelt and it would be insulting to refuse it. That isn't the case as you describe it.