2 Tim 3:16 All scripture is given for inspiration, for doctrine... So, if one believes that both the Sermon on the Mount means what it says, and Luke 22:38 ("So they said, "Lord, look, here are two swords." And He said to them, "It is enough.") means whaat it says, too; then the answer is they are both right. Ours is to discover how they are both right. Indeed, Jesus gave the Sermon on the Mount first, then later on, at the Last Supper, He gave the apostles His final instructions before He went to His betrayal by Judas. His instructions?
Seems pretty plain to me. "Boys, earlier you didn't need to carry money or even shoes. Now, things are different. Take money with you. Get a sword. In fact, if you don't have a sword, sell your garment and buy one." If that isn't a call to self-defence, there isn't much more that would suffice as one.
So is this inconsistent with the Sermon on the Mount? Scholars have debated this, as for me, I go with Luke 22 means what Luke 22 says.
I ask this literally, not rhetorically: are you saying that the Luke passage abrogates the Sermon on the Mount? All those teachings (the related ones, in any event) were in effect for the very, very short period between the time the speech was given and the night Jesus was betrayed?