Yes (see Medicare, page 10 ssa.gov/pubs/EN-05-10043.pdf). However, even if you want to postpone Medicare enrollment until after you quit working but intend to enroll in Social Security, you will be automatically enrolled in Part A when you do enroll in Social Security as the law does not allow one to enroll in Social Security and opt out of Medicare Part A. So if you want to postpone Part A you must also postpone Social Security benefits to be eligible for HSA contributions.
Have more questions? Submit a request