It is correct to use both 'for me' and 'to me', and your understanding of the difference is not far wrong. I would use 'to me' when 'to' was part of the idea 'meant to' -"me" being the object; I would use 'for me' when the idea 'for me' introduces a complement: 'It would mean a lot for me to have the support of your company'.
Others may disagree, and I may change my mind! But I can't imagine any grounds for supposing that either phrase is 'wrong'.
Student or Learner