Technically, actually, your sentence doesn't even have to be true. Consider:
"There's a man in Memphis who paints pictures of dogs in the park for a living. I don't know what his name is, but let's just call him Jerry."
If I were to say next "Jerry's name is 'Jerry'," I would (probably) be speaking falsely, because 'Jerry' is just the name that we, as storytellers, are using to keep track of this man (possibly in an indeterminate way); it's not this person's actual name. The same applies to "Barack Obama's name is 'Barak Obama'".
If your original sentence was "Barak Obama is Barak Obama," then Kripke would say, without hesitation, that the truth of this sentence is both a priori and necessary. But with your original sentence, "Barak Obama's name is 'Barak Obama'", I think Kripke would have to say this is contingent, since as you said different worlds could be employing different languages or different assignments of names to objects.
That does not, however, refute Kripke's position on names being rigid designators. The point is that names in our world rigidly designate the same object in every possible world, not that in every world names pick out the same object. Of course Kripke would agree that there's a possible world just like ours except the names are all mixed up, so that my name (in that world) is 'Brad Pitt', and Barak Obama's name is 'Hilary Clinton', etc. But given the (ideally unique) reference of names in this world, in our actual language, those names pick out the same people as we consider different worlds. The analogy is similar to the language-metalanguage distinction; while it's true that the objects of the possible worlds could be employing different languages, or using the same language differently, still names in the metalanguage, the language we're using to describe these possible scenarios, pick out the same object across these different worlds. (Of course, not everyone agrees with this line of thought, but it's certainly a reasonable position to take.)