The literal similarities are significant but not striking. But the context seems to speak clearly for a Markan allusion to the Song of Songs (as Paul in 1 Corinthians). Jesus warns in Mark 13:32-37 not to miss the right time. The three women in Mark 16:1-8 come too late to the empty tomb. It's just the unnamed woman in Mark 14:3, who has chosen the right time (Mark 14:8 She has done what she could; she has anointed my body beforehand for burial.)
Song of Songs 1:12 - So long as the king was at table (ἀνακλίσει), my spikenard (νάρδος) gave forth its smell.
Mark 14:3 - as he was reclining at table (κατακειμένου), a woman came with an alabaster flask of ointment of pure nard (νάρδου πιστικῆς), very costly,
Song of Songs 1:3 - And the smell of thine ointments (μύρων) is better than all spices (ἀρώματα):
Mark 14:3 - a woman came with an alabaster flask of ointment (μύρου)
Mark 16:1 - When the Sabbath was past, Mary Magdalene, Mary the mother of James, and Salome bought spices (ἀρώματα) , so that they might go and anoint him.
Song of Songs 1:3 - thy name is ointment (μῦρον) poured forth (ἐκκενωθὲν);
Mark 14:3 - a woman came with an alabaster flask of ointment (μύρου) and she broke the flask and poured it (κατέχεεν) over his head