I know how to find accounts (which will include gmail email ids of user) and how to filter gmail account.
AccountManager am = AccountManager.get(context);
The 'association' will be managed by the Android Market/Google Play application, and I don't think it has any public API's that tell you what accounts it uses. Additionally, in recent versions, it can use multiple accounts, so potentially, any Google account on the phone can be used with the Market/Play Store app.
Why exactly are you trying to do this? To be able to delete accounts 'safely'? The user will get an appropriate error message, so they should be able to decide whether to remove the account or not.