Wordpress has a built-in function to determine the post ID from a given URL : url_to_postid( string $url );
It will return the post ID or 0 on failure.
2) Then you could use the wordpress function to get the post ID and your acf values.
3) Finally, you launch your modal if you get all your needed datas.
Let me know if it helps,
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users