Hi there! You do not need to apply for a fiancee visa before you get married. I am also here on F-1 and I just got married last summer. I am continuing my schooling until I graduate and that's what's keeping me here legally until I file my AOS. I would suggest that you get married well before your visa runs out so you have time to file your AOS before your F-1 expires. Once you are I-485 pending (USCIS has your app.) you are legal until a decision is made.
About the working, when you file your AOS you should include with it the work authorization form (I-765). It will take 90-120 days for them to process that and it will allow you to work while your AOS is pending. And, you can work anywhere you would like, just like a regular citizen. Once your AOS is approved and you have have your GC you can also work anywhere (expect for jobs that require you to be a citizen like the post office and stuff, but I think you get what i'm saying). You do not have to wait 3 years or anything like that.
I hope that helps!
