If you've already deployed your app on the App Store for iMessage, unfortunately you cannot do this migration from a standalone iMessage app to a full iOS app. You would need to create a new iOS app (i.e. different bundle identifier, and separate iTunes Connect app entry), and then move your extension over to that new app.
If you haven't submitted to the store, then you would basically do the same thing of create a new iOS app project, then add an iMessage Extension to it, and bring your code over to that new extension from your existing project.
Could this new iOS app have the same name as the iMessage extension? That is, if the iMessage extension is called My App, could both the iMessage extension and the new iOS app be called My App?
Or do we have to pick a different app name? If we have to pick a new app name, could we keep the iMessage extension with its current name?