The problem with this question is that guards don’t travel alone and soldiers don’t either. A good security setup ensures an attacker won’t have the opportunity to ambush the guards, at least not more than one. The entire goal of security is to not leave people alone where they can be isolated and picked off. Basically, if a guard can be ambushed then there’s no point in putting them there. If you don’t have the manpower for multiple guards, then you create choke points and controlled access.
You want people with overlapping fields of view. So if someone goes down or gets attacked, they don’t have to call it in. There’s already another person available to call in the attack and move to stop the attacker.
Ironically, of all the things Assassin’s Creed isn’t useful for, the later games are helpful for this. Even then Assassin’s Creed security is usually pretty shoddy in comparison to the real thing. (If you just had flashbacks to all the times your assassin got caught and killed on a stealth entry, that’s the way it often goes.)
A setup where the guards can be picked off one at a time out on the fringes is the opposite of security.
So, while a relatively inexperienced fighter could defeat a trained guard or soldier in a knife fight assuming they had the element of surprise, could get the weapon out before the soldier noticed, got their courage up, and rushed in to stab the guard/soldier in the side nine or ten times.
The question is could they manage all that without being discovered?
The answer is probably no. In addition to that cheerful thought when they’re discovered, they’re either dead or captured depending on how the other guards are feeling. While they might manage to kill one guard, the others will get them. This is the basic issue when it comes to any secured location, be it a prison, a bank, a military base, a castle, or a rebel stronghold.
Soldiers work in groups. Guards travel in twos, at least, with another somewhere above handling overwatch. Anywhere you find one, you can bet there’s probably around five more ahead all in strategic points overlooking each other. With the added bonus that they understand the layout of wherever they are better than the person trying to break in or break out.
The point of a secured location is that it’s secure. You can do it all with humans. Cameras are just dessert, they’re nice but they’re not necessary and the human eyes are positioned to cover the holes anyway. Fighting your way past a guard will inevitably lead to more guards swarming the area.
The best thing to do for someone who is relatively inexperienced is avoid the guards, rather than fight them. Someone trained in infiltration can fight, but the trick here is that they know how to. Even then, competent guards are no joke.