I do not see why not, If that is what you have.
If you are going to buy one I would think about one of the "portable" ac units. You could vent it into the room or you could vent it somewhere else (attic, basement, window)
One issue that you will have to contend with on a window unit is the condensate (water) tube, on my portable unit the water is fed into the exaust air stream and it evaporites.
If you read some of my other posts you will see that I am usually sarcastic or critical of spelling errors. It is refreshing to see a concise well written question.