Do carrots need to be within a certain range of the player to grow?

Not only the chunk needs to be loaded, but their growth also depends on "random ticks", which only happen in a roughly 128 block radius around the player. The exact definition from the wiki (archive):

On every game tick, each chunk within the render distance of a player and with centers within 128 blocks of a player are ticked.