Indefinite article with a noun in the plural: “(a) dedicated 4 years”
Both of the statements at the top of my head are correct. 4 years is not a noun, so you shouldn’t put adjectives in it. You can either move the adjective to the noun:
accrued through 4 dedicated years in IB
or use a different noun:
accrued through a dedicated, four-year term in IB.