WordPress AJAX PHP(html) file that is within WordPress Loop

There is no such thing as an AJAX call that’s inside the loop. The server has no idea what page or where on that page an ajax call is coming from unless you explicitly send it that data as a part of the ajax call. You’re going to need to send some data to the php function so it can recreate the correct query (or the current post if that’s all you need.) i.e. You send a post ID in the ajax, the php function it calls then does $post_id = $_POST[post_id]; (please add your own sanitization and validation here.) Then instead of calling the_title() you would call get_the_title($post_id)