I see two issues here:
Is it misleading to cite a reference you didn't know about until after your work was done? In particularly, does it misrepresent history by falsely suggesting that this reference influenced your work?
Is it unfair if you have to give credit to someone else for something you independently did yourself, without even knowing about their work?
The otheranswer to both questions is no.
Citing sources is primarily about assigning credit and indicating where one can find details or more information. It's not about describing your personal influences. In particular, everyone is aware that some references may only have been found after the fact, so nobody will interpret a citation as necessarily indicating direct influence while your work was being carried out.
As for the second issue, academic credit is awarded for making a novel contribution that advances the state of the art, rather than for rediscovering what was already known. Being credited is a form of recognition for telling the world something new, rather than a reward for being clever or having worked hard. (The person who rediscovers something may be just as clever and hard working, but hasn't done as much to increase the world's store of knowledge. Of course, there may be borderline cases, where the original discovery was really obscure or its full generality had not been recognized. I'm talking in broad generalities here.)
If you independently discover something at roughly the same time as someone else, then you can appropriately claim some of the credit for it. However, you can't show up substantially later and expect to share the credit.
I suppose you could simply claim it as your own and note that someone else has come up with it, as well. Is this necessary? It is your own work, after all, even if somebody else came up with something remarkably similar.
There are times when noting that you did it independently could make sense, for example to explain why your approach differs in some ways from what is usually done. However, you should be very careful about how you do this, since it looks bad if you seem to be claiming more credit than you deserve. In most cases it's better not to point out your independent rediscovery.
When you ask "Is this necessary?", are you asking whether you need to include the citation at all? Yes, you almost certainly do. Omitting a citation is allowed only for things that have become common knowledge in your area (e.g., just about nobody cites Newton for the laws of motion) or are so trivial that they aren't worth any credit at all. This citation is evidently not common knowledge, since you didn't know about it. It might in principle be a triviality, but the previous discoverer must have thought it was worth publishing. Declaring it trivial and unworthy of citation is a very risky move, which you should make only if you are confident in your judgment and expertise.