Yes, it's possible, as long as the people are not currently married and meet the age requirements of the state in which they plan to marry. It will not make the "illegal" person "legal," however. The process of getting the person "legalized" will take many many years.
yes it is all they need it there id from there othere state and there you go your best bet is to go to Vegas that is where i did
The person legally here ( the USA) should first aplly for a fiance/ee visa for his/her future husband/wife to brin him/her to the US legally. It would be wise to say that your fiance/ee is still in her home country if you go directly to the USCIS. I do not know if it will take longer to get the visa than if the legal immigrant is not a US citizen, but he/she will get it. That's the right way to do it to avoid future problems in getting a "green card" for the future foreing husband or wife.
ANSWER: Yes they can get married, but it doesnt guarantee legal status. The best thing to do is go back to your country, get married there and start the whole process. It is the faster, cheaper way to do it (i hope you don't have criminal record- imean the immigrant)