The ban will prohibit those without documentation to purchase guns.
The ban will prohibit those without documentation from purchasing guns.
The ban will prohibit those without documentation to purchase guns.
The ban will prohibit those without documentation from purchasing guns.
When the object of prohibit is the person or group prohibited from doing something, the correct idiom involves "from" + [gerund]: "to prohibit A from doing X." The infinitive structure, "to prohibit A to do X" is always incorrect.