Advisor trying to patent an idea for himself even though we wrote the paper together!
The proper place to handle this, now, is the IP office at the university. Raise the issue in your own name so that your colleague doesn't suffer any consequences, but if negotiations follow, make sure everyone appropriate is included. 

But you may also want to consult an IP lawyer. The university may be able to help you with this also. 

It is hard to avoid all negative consequences in a situation like this, of course. Especially if the professor is a bad actor with power.