Yes, you can get a ticket.
However, once you get to court and the police officer explains to the judge that you had an empty jar that smells like it used to have pot in it, you should get it dismissed.
Of course if he says that there were small traces of marijuana left in th ejar, that's a different story.