Can I ask for recommendation from a person that I am working with? 2 years ago, for 7 months, I was an intern in public health department at a famous US university. In addition to work with my mentor, I was introduced to a faculty member from the other department, called X. My mentor and I helped his team to analyze their data in that time and the project is still going on and sometimes, if his team needs, I work on their project which is not paid.
Currently, I am going to apply for a PhD position or research assistant position. I need three references or even three recommendation letters. I was wondering is it rational/polite if I ask X to send a recommendation letter for me or if I can introduce him as a reference in my CV?

Also, if I want to mention the name of someone as a reference in my CV, should I talk with him prior to send my CV?

Thanks.
I know this question was asked a while ago, but I found it while searching and can't believe it wasn't answered.


  My mentor and I helped his team to analyze their data in that time and the project is still going on and sometimes, if his team needs, I work on their project which is not paid.


It sounds like you helped in research and also have a personal relationship with him. Of course this is exactly the kind of person who can probably write a great recommendation letter or give a great reference, especially if he liked your work. Even if he isn't in exactly the same field as you, he can probably write a very specific recommendation letter pertaining to research you helped perform.