"To the War is Gone"(1966) by Richard C. Meredith (available on the Internet Archive) as suggested by Covert Walrus ticks a number of boxes. It was published in the November 1966 issue of Worlds of Tomorrow.
Dral was a soldier. So was his enemy—it made no difference she was also a young girl!
The story opens and ends with a quote of Thomas Moore's song "The Minstrel Boy".
The Minstrel-Boy to the war is gone,
In the ranks of death you'll find him;
His father's sword he has girded on,
And his wild harp slung behind him.
"Land of song!" said the warrior-bard,
"Tho' all the world betrays thee,
One sword, at least, thy rights shall guard,
One faithful harp shall praise thee!"
Thomas Moore
1779-1852
It features Dral Mancil, a Cannoneer Second Class, sitting in his gun turret in the wreckage of the Rakewind, playing his varmel, a 8-stringed instrument. Fragments of the songs he plays are interspersed throughout the story. Dral is without a space suit, his leg broken, and no way to reach the lifeboat, when he sees an enemy soldier, a Thorna, heading for that same lifeboat from the wrecakge of their ship. He can't bring himself to fire, as that would destroy the already slim chance he has of using that lifeboat, so he tries to contact the soldier.
After having reached the lifeboat, the enemy soldier answers.
"'Ello, in the cannon turret, can you 'ear me?" a feminine voice said from the loudspeaker in the console of the cannon controls.
She's called Tonu'Lehani. She tells him that while she was on the Thorna ship, she is not a Thorna herself. Thorna have an alien parasite called a "Little Brother" which allows a shared consciousness between Thorna. But according to Tonu just about 5% of the Thorna faction are actual Thorna, with a Little Brother. Tonu is in a similar predicament as Dral, because the lifeboat's fuel cells have been smashed. While coming close to killing here a couple of times, he gradually warms up to her, which sort of matches with your recollection of them becoming friends. Dral even sings her songs, playing his varmel.
Using a spacesuit from the lifeboat, she's able to rescue Dral with his varmel. But it turns out she has betrayed him, because she does have a Little Brother. She paralyses him and informs him a Thorna warship is on its way to pick them up, since he's the only survivor of his ship and may possess knowledge of its new shield that allowed it to go undetected. He may not have conscious knowledge, but may have overheard conversations and picked up things which he may not remember, but once fitted with a Little Brother himself, surely will. And her Little Brother is ready for fission.
But Dral is able to free himself and uses his varmel, that had been handed down through generations, to smash and kill Tonu's Little Brother, causing her to die with it. The story ends with Dral firing at the Throna warship, knowing that he too will soon die from its missiles.
The Minstrel fell!—but the foeman's chain
Could not bring that proud soul under;
The harp he lov'd ne'er spoke again,
For he tore its chords asunder;
And said, "No chains shall sully thee,
Thou soul of love and bravery!
Thy songs were made for the pure and free,
They shall never sound in slavery."
Thomas Moore