Do I tell that a colleague might be leaving work?
You've stated in your answer that your colleague's departure will impact your project negatively.
Which do you value more? Your project or your colleague?
It's a serious question, because if your project is more important to you than your relationship with your colleague, it's in your best interest to make sure that it runs smoothly.
On the other hand, you're likely to lose a friend if your colleague has changed his mind, or if your tattling on him results in his termination.
…and how?
I feel as though the majority of questions on the workplace can be answered with:
Have a frank discussion with the parties involved and determine the best course of action based on your situation.
How would you handle this from an ethical and professional standpoint?
I try to value people more than projects. I've had varying degrees of success with many projects, and I can say that I'd much rather have an unsuccessful project than lose a friend.
In your situation it sounds like your coworker approached you in confidence. If the same happened to me, I would approach the coworker privately to discuss how best to resolve the conflict. As for words, I might say something along the lines of:
Thanks [coworker] for letting me know that you'd planned on leaving. I appreciate the heads-up.
I'm a bit concerned about how your leaving the project is going to impact our success after you're gone, and I'd like to be able to have some sort of plan in place before you go so that we're not all struggling to get by without you.
Is there a way you can let [project manager/relevant superior] know that you're leaving so that we can put a plan in place?
Of course, maybe they can't talk to the boss because that might result in their early departure, so I would consider options such as setting up a private and informal plan, or having the entire project team spend some time increasing the bus factor so that your project isn't negatively impacted by any other team members leaving.