Unfortunately this can't be done. At least not in any perfect manner. There is no API to get any details about the user and their purchase. If your 1.0 version of the app doesn't already persist some meaningful clue, your only solutions would be partial at best.
Your issue is made worse if you already have newer versions of the app out (such as 1.1) and you want to add this new feature to a newer version (1.2 or 2.0). There is no way to know if anyone ever had 1.0.
You basically have two options:
- Leave it alone. You can't convert a paid app to a free-with-IAP app without hurting at least some portion of your existing customers. If anything, leave the app paid but add IAP for any new functionality. This way, everyone pays the same for the base app and everyone has the option to pay more, through IAP, for additional features.
- Depending on your ethics and the number of existing customers, you could just make the switch and make existing customers pay again for functionality they already paid for. Obviously, this is a bad idea but it is an option.