The free and the paid version of Pyramid are separate applications. You can have both of them installed on your device at the same time; the paid does not overlap the free version when you installed.
Check your device for another install of Pyramid application that has the same icon as the free version, this is the paid version with no advertising. You are still playing the free version if you are getting ads.
If you can not find the paid version, go to the App store on the device, tap updates, tap purchased, tap not on this iPhone and scroll the list until you find Pyramid (Not Pyramid Free), tap the cloud and install the application.
Just note that the statistics are not transferred over as Apple treats every application independently, so you will start fresh with the paid version.