My boss did not help things when he told Bill 'Bill, you're the guy until OP rolls his lazy butt in at 11:00', and that 'OP is really better behind a desk'.
That's a huge RED FLAG:
You are working the wrong issue. Your problem is the CEO, not Bill. There are clear indications that your CEO thinks that Bill is better at your job or more valuable thenthan you are.
I would advise to have a rigorous look at your own performance and the value that you add. You need to to make sure that your view of what you should be doing and what it means to the company is fully aligned with your CEOs. It's highly likely that your boss thinks that you have some significant performance gaps, so make sure these are clearly identified so you can start working on those. It doesn't matter whether the gaps are real or perceived: theperceived; they need to be addressed.
Once your CEO sees you as a high performing and highly valuable contributor, the problem with Bill will probably just take care of itself. If there is no credible path to closing these gaps you need to start looking.