This is how I understand it:
AC units are more heat movers (pumps) than anything in that they just take ambient air and separate it into cold and hot exhaust air. If you don't exhaust away the heated air separately, it will just remix with the cooled air and bring efficiency down to zero or below (no overall gain with some loss due to the heat produced by the unit itself).
So if it were used as designed, it would just exhaust the hot and humid air outside while recirculating the cooled and dehumidified inside - which gives it great efficiency over time.
The window unit will also dehumidify the air but most put that water right back into the hot exhaust for removal from the unit after it's been used... which leads us right back to where we started again since the hot and humid exhaust isn't being routed away. It also means that the unit will be dehumidifying more than designed.
So the short answer is no - using the window AC unit inside a room like that would just result in the unit functioning as an expensive (non-cooling) fan that will produce a lot of water.