Saying thank you to professor & asking for a reference at the same time? I would like to say thank you to a professor for a conversation we had when I was not in a good place. However, this is > 2 years ago now. I also have not been in touch, so I'm not sure he will remember. 

Lastly, I will need a reference at some point in the future, and I am going to ask this professor.

I am worried that saying thank you now will look like I am just getting in touch because of the reference (which I will possibly have to ask for in already a month or two). 

Could it be interpreted this way, and should I maybe just leave this now? I am worried it will look very fake and like I am only emailing now to secure that reference. At the same time I would like to say thank you, which I was not ready for before.
How about if you put it the other way around? Ask for a reference first and add later something like "I'd also like to take this opportunity and thank you for ..." and explain your situation. Then it at least seems less suspicious, since you are asking for something first.

Alternatively, ask for the reference in one email, and if you get a reply, thank him/her in a second email.