One phrase refers to a friend. The other refers to my friend.
The first accurately translates the example given. The second phrase uses words not included in the example to say somewhat the same thing. The possessive nature of my friend suggests more closeness than the first phrase.
If the idea is to translate the phrase to english, "I have my friend's shirt." is the same meaning, and more accurately the way the French would translate into everyday english usage. We would never say "I have a friend's shirt." This seems close enough to be an acceptable answer. If the intent on writing in French is to use the language as the French do, then the reverse translations should do the same.