It is also possible he is just a flirt. I've known guys that I thought liked me but was disappointed later to learn they didn't. In retrospect I think they were trying out their techniques on me as a form of practice. These men are jerks and not worth your time.
of course, if you like him try to straighten things out with your friend because it's better to be truthful instead of hiding things behind her back. if you dont like him, politely sit down and explain to him that you're not interested.