Is it acceptable for a student to ask a professor to be included as a co-author on the professor's paper?
It's fine to just ask. 

But if you feel uncomfortable asking straight out "Can I be considered for authorship on this paper?" an alternative approach is to have a conversation about authorship that (1) makes it clear to the professor that you're interested in authoring a research paper, and (2) helps you understand the shades of "it depends" for your specific kind of research.

For example, you might bring up in conversation:


  In our field, what kind of contribution are students expected to make in order to merit authorship on the paper that comes out of their work?


Then you can ask,


  On this project, what additional work could I have done in order to have sufficient contribution to be considered an author?


and then, if you want very much to co-author a research paper and plan to continue working with this professor,


  I'm interesting in being a co-author on a research paper. On the next project we work on, can I have a role that (if I do it well) merits co-authorship?


Ideally, if you had just asked straight out "Can I be considered for authorship on this paper?", the ensuing discussion would also cover the points above.