Short answer: Yes
Long answer: It depends. If the weapon is of the same type as your own you should get ammo just by walking over it. If it is NOT the same type as your own, but you are eligible to use it*, then you can look at it and press your “use” key (F by default) and you’ll trade your weapon for the one on the ground.
- Eligible to use it means a medic can’t pick up a panzerfaust for instance. Nor can an fieldop pick up a sniper rifle. The weapon you pick up must be avaliable to the class that you belong to. So if you’re a soldier with a MG42 and you kill a enemy carrying a flamethrower then you will be able to pick that up since it is avaliable to the soldier class.
And finally, some quick thinker has by now probably asked themselves “Hey! The MP40 isn’t avaliable to an ally soldier and the Thompson isn’t avaliable to the Axis! What gives?” Well, since these weapons are both SMGs you are able to pick up the fallen enemies weapon and use it. Until you run out of ammo…then you try to pick up some other stray weapon etc… (Again, by looking at the weapon and pressing “F”)
Hope that clarifies it.