Should I ask for co-authorship as an undergrad student?
If you have conducted the pilot study and are also part of the follow-up team expanding it into a full publishable study, then you should definitely be invited to help write and be an author of the paper.

This should also be an easy and uncontroversial decision for your professor.  It's also fine and in fact good to get that clarification explicitly now.  You can just ask something like: 


  I'm excited about helping turn this project into a paper.  Am I right in thinking this means I will be an author of the paper as well?


This is not a hard question, so if your professor says anything other than "yes," (possibly with appropriate caveats about you actually sticking with the project) then you should be concerned.