I'm well aware of what's legal for civilian ownership in the United States, and it *does not* include prolific RPGs, ATGMs, large numbers of squad automatic weapons, etc. At best, civilian armament in the United States works out to an irregular skirmishing guerilla force -- and the most effective weapons for those are IEDs, not tricked out ARs.
Yes. And that would be a ridiculous by historical standards amount of irregular skirmishing guerilla force. Sure, you are right, even that won't stop an armored division...
But lets not underrate the issue of guerilla forces either.
It will turn logistics and occupation into hell. Won't stop them alone for sure if the other side is willing to take and\or inflict massive amounts of death. However, as long as the war still goes on, every armored vehicle, soldier and artillery shell that has to be kept in reserve, or worse, used to fight the guerillas, is one that is not available on the frontlines. Moreover, every piece of material stolen or destroyed by guerillas is also not serving the enemy's war effort either.
Worse, as the meme goes, and is the accurate answer to "hurr can't win a war with small arms alone", the most obvious thing guerillas will do is to use their small arms to take opportunities to steal supplies from the enemy military still busy fighting a war, with any stolen heavy weapon ammo (especially artillery shells) being easily repurposed into IEDs.
Now they have small arms and IEDs, and its not funny anymore.
And if the invading army are major users of single use disposable light anti tank weapons, like a lot of major powers are, that's gonna be another supply looting priority.
In specific case of USA, ARs are just an overblown by both sides for political and cultural reasons contention point. Great for ambushing squads of support personnel, even small groups of soldiers, but lets not forget the other guns.
Handguns - concealable, filling a very different niche in a guerilla's arsenal than a rifle, for the exact reasons why they are the favorite of criminals plaguing America's cities aswell.
Medium and big game hunting rifles - with a night vision scope for a bonus. There are immense logistical costs to effectively securing an area from potential 1000-1500m range sniper 24\7, and its not much cheaper to hunt him down after he strikes either. The very fact that many are willing to tie down such expensive and limited assets as tanks, artillery and aircraft into hunting down a sniper testifies to the threat they pose.
Rare but underrated - anti materiel rifles. Most of the above points apply, except with expanded options for large scale havoc, as the name implies. There is quite a number of hard to guard places in which mere few well placed .50 cal bullets can cause 6 to 8 digit USD worth of damage to military equipment and civilian infrastructure that is kinda important to fighting a war.
Even then, guerilla warfare is much more effective against a Western style peacekeeping force operating with the gloves on, versus a Soviet-style occupation where the response to sniper fire is "artillery / air support promptly levels the block".
Not unless they have infinite logistics cheat codes. Artillery is not free, citizen. And lets not even talk about how much airstrikes cost...
Counterpoints:
Chechenya vs Russia - lost but secured concessions
Afghanistan vs Soviet Union - won with foreign covert support
Poland and USSR vs occupation by THE Nazis - meaningfully contributed to the war effort of the winning side