Faculty member X offered me a PhD position, spontaneously. I have also been interviewing for a job. The company asks me now for a reference, and I clearly cannot provide X. I want to provide faculty member Y, which knows X and is in her same department.
How do I ask for a reference to Y, without having X know?
My idea was: Dear Y, [...] I was thinking of continuing with a project supervised by X, or to stay in industry. Since you know me well from course Z, seminar W and project K, I would be glad if you could act as a reference for an industrial position. In case this helps, I attach some detail about company, position and my CV [...].
I hope this is a good draft, and if not, I am looking for ways to improve it. Assuming it is a good idea to approach Y in the first place!
The assumption in the answer of @JosephDoggie is correct: I still consider the offer of X, and will likely take the job, if I am offered it.