Assuming that I have access to a replicator without any security restrictions, could I replicate a phaser with the replicator? Would it be replicated charged, or would I have to charge it?
Yes, absolutely you can.
In the episode TNG: Samaritan Snare, the Pakled take Geordi's phaser from him and replicate several more.
Quoting from the screenplay
REGINOD: (re: the phaser) We can make more.
Geordi reacts, realizing:
GEORDI: You have a replicator?
GREBNEDLOG: (with pride) It is not broken.
GEORDI: I didn't come here to give you weapons.
GREBNEDLOG: (re: the phaser, points it at Geordi) You will make more.
then shortly afterwards...
The viewscreen comes alive with the image of Grebnedlog holding Geordi's phaser in his mitt. Reginod and the other Pakleds all hold replicated versions of the original now. Geordi is in the background, slowly struggling to his feet once again, propped up by Reginod as other Pakleds play recklessly with their phasers. One of them takes a shot at his comrade, missing him, like children playing with dangerous toys. Grebnedlog turns to face the viewscreen
Since the Pakled lack a basic understanding of how the phasers work, it seems vanishingly unlikely that they could work out how to charge them. They must have come out of the replicator fully charged.
Most probably yes
The Memory Alpha page on replicators explains that replicator technology uses:
transporter technology to dematerialize quantities of matter and then rematerialize that matter in another form
Hence, I don't see any reason why a fully-operational phaser couldn't be replicated. I doubt that it would be replicated charged though; I expect it would need to be charged manually.
Also consider the following quote:
On Starfleet installations and starships, if a person in custody is confined to quarters, it is standard policy to disable the replicators that the person has access to, in order to ensure that a weapon cannot be replicated. (DS9: "Inquisition"; VOY: "Counterpoint")
Bear in mind that it is probably physically capable of producing a phaser; one would need to program one into the replicator itself.