How to find the edit link of the WordPress Post from the URL

Yes, there is. You can use url_to_postid function:

$postid = url_to_postid( $url );

It will give you ID of a post based on URL.

So if you want to get edit link, then this will do exactly that:

$postid = url_to_postid( $url );
if ( $postid ) {
    echo get_edit_post_link( $postid );
}