Without more context? Probably evasion. An important part for everyone is knowing when not to fight, not just special forces. When extremely outnumbered, drawing attention to yourself is basically never the answer. The rifle actually makes things worse, if they had a knife, at least then they’d have a weapon they could use covertly… but, there’s no way to fully suppress a rifle shot, and if we’re talking at close range, pulling the trigger would just get them swarmed and killed.
Ideally, and this is just my thought process, not someone with special forces training, the best route would be the fastest and safest way to break through their perimeter and get some distance before they know where your operator is.
If they don’t know your operator is there, then, yes, the only thing he or she needs to do is avoid drawing attention and wait. Actual recon missions can get kind of insane, with operators staying in one place for a couple days at a time, less than a foot from enemy patrol paths.
In a rural environment, this is going to be disturbingly easy, unless the swarm is well coordinated, and is conducting a coherent search. In an urban environment, it’s much more dangerous because of blind corners and closed doors.
In a feral city, the answer might be getting the attention of a group that’s hostile to the mob hunting your character, and using the chaos to get out. In a normal one, it could be as simple as drawing the attention of law enforcement, and, again, using the confusion to slip out before the police establish a perimeter.