I like this question! I think it hits right at the heart of a debate that probably has raged since writing began. Let's begin by taking a closer look at your question: "Is it ever OK to ask a question in a compare/contrast essay?" The key word there is "ever." Even without further thought, this word makes red flags shoot up for me. Very rarely in life are we confronted with a "never" situation...that's the beauty of exceptions (which seem like they are everywhere in the English language.) So my first instinct is to say "Yes, at times it is appropriate to ask a question in a compare/contrast essay."
But there is another piece of information kind of missing from your question...are you asking a question and then answering it yourself, or are you posing it to the reader? If you are answering it yourself, then, well, it's a slam dunk. Ask all the questions you want! If you are posing it to the reader then the only way you can determine if it is appropriate to include the question is to decide for yourself. It's a stylistic choice.
I should put an asterisk, there, though, because in order to bend rules based on grammar or common practice one must be pretty well versed in in those rules. It's like saying "if you are going to speed, be sure you know how to drive before you do it."
Ask yourself what the purpose of a compare/contrast essay is: to compare the differences and similarities between two objects, places, people, or ideas. This is the main goal of the essay. Does your writing do that? If so, I would have to say that if you determine a question fits well stylistically with your writing then go for it. You might find purists out there that say there is no place in a compare/contrast essay for questions, but I feel that as long as your writing is doing its job (that is, conveying the appropriate message) than you should be free, as the writer, to manipulate the language stylistically as you see fit.