No, Part B is optional.

If you or your spouse are still working and you are covered by your employer group health plan, you may not need this part of Medicare until you or your spouse retire. You should contact that employer or benefits administrator to find out how your coverage works with Medicare. You can sign up for Part B without paying a penalty any time you have health coverage based on current employment. COBRA and retiree health coverage doesn’t count as current employer coverage.

Once your employment or coverage ends (whichever happens first):

You have 8 months to sign up for Part B without a penalty. If you don’t enroll in Part B during this 8 month period, you may have to pay a penalty after you enroll for as long as you have Part B. You won’t be able to enroll until the next General Enrollment Period and you’ll have to wait until July 1st for your coverage to begin.

When you enroll in Part B your Medicare Supplement Open Enrollment Period begins.