As I understand it, if you continue to work, you can keep your employer-provided insurance and do not have to apply for Part B until you quit working. You have something like a six-month window, three months on either side of quitting working, to apply for Part B to avoid a higher PERMANENTLY HIGHER premium for Part B. I think you automatically qualify for Part A as soon as you turn 65, regardless of whether you retire or continue working.
I am no expert so don't take my word for it. Get a Medicare adviser to explain it to you. I also recommend speaking to someone in a medical insurance firm who knows this stuff backwards and forwards to make sure you got the straight info.