Yes, you can beam people against their will in Star Trek.
We've seen several examples of Starfleet officers being kidnapped via alien transporters.
For example, in Ménage à Troi, Riker, Deanna, and Lwaxana Troi were forcibly beamed off of the planet Betazed by Ferengi transporters.
And in The Mind's Eye, La Forge was forcibly beamed off of a shuttlecraft by Romulan transporters.
Even if you discount examples such as those, on the basis that they involved alien transport tech, there are multiple examples of Starfleet transporters being used to beam people against their will.
For example, in Datalore, Lore was thrown (by Data) onto a transporter pad and beamed into space.
And in A Matter Of Honor, Captain Kargan was forcibly beamed off of his ship and onto the bridge of the Enterprise-D.
We've also seen instances where characters in Star Trek knew an attempt might be made to beam them somewhere against their will, and used technological means to prevent it.
For example, in Power Play, Troi, Data, and O'Brien were possessed by alien entities, and were holding people hostage in Ten Forward. An attempt was made to get a transporter lock on the possessed officers, but O'Brien took the transporters offline in order to prevent that.
RIKER: Transporter room three, can you get a pattern lock on Commander Data, Counselor Troi and Chief O'Brien in Ten Forward?
CREWMAN: Attempting to lock on, sir.
O'BRIEN: You were correct. They're attempting to engage their transporters. But I know how to shut them down.
DATA: Do it.
CREWMAN: Bridge, the entire transporter array has been taken off line and placed into diagnostic mode.
Star Trek: TNG "Power Play" script
And in Star Trek: Insurrection, Data used a transport inhibitor to prevent himself from being beamed off of a scoutship after the shields had been briefly disabled.
The very existence of transport inhibitors is strong evidence that desire alone is not enough to prevent oneself from being transported (at least, not for non-augments).