Parsing post->ID in included plugin file

First issue- you can’t access any data because your AJAX request is an entirely separate request from the one that loaded the page you’re making the request from. This is not unique to WordPress. You have to pass the data you want to operate on along with your AJAX request.

Second issue- calling your plugin file directly is not the correct way to handle AJAX requests. You won’t have any access to WordPress functions this way unless you manually bootstrap WordPress. Read AJAX in plugins for the correct way to handle AJAX requests in plugins.