There are open-source licenses that allow you to sell, and there are ways to license your open-source project for non-commercial use. mattnz's question about the competition rules is an important one. The question about who owns the rights to the submitted source code is important. You also need to be aware if there is a specific open-source license the competition requires you to use. Some will make it hard for you to sell that code later.
If this is your first attempt at deploying a commercial product, I advise you to keep it as separate as possible from your open source work. There are many surprises ahead of you in creating and releasing a product on a mobile platform. You don't want extra surprises around your licensing.
I would suggest deciding on a different project for the open source competition. If you can use any open-source license, choose a related project that allows you to develop an underlying library you can use later. License it with something like BSD. That will allow you to make use of your library code later. Be careful though. If you have to use GPL, you may not be able to use that library later on, and you will be better off choosing an unrelated project. Also, if you lose ownership rights to the code, definitely do not submit something you want to build on later.
You can always open-source something at any time. You can't usually undo that.