Get path/url/uri of Entity reference field to content in a Twig template?
The url is not an entity field, so you can't access it directly. Also the entity methods to generate url/links are not accessible in Twig because of the sandbox policies. You can build a path though, if you have the id of the referenced node:

{% if not node.field_ref.isempty %}
  {{ path('entity.node.canonical', {'node':  node.field_ref.entity.id}) }}
{% endif %}


Reference: https://www.drupal.org/docs/8/theming/twig/functions-in-twig-templates