Edit node as text link in Twig
See this example from Functions - In Twig Templates:

{# Link to node page. #}
&lt;a href="{{ path('entity.node.canonical', {'node': node.id}) }}"&gt;{{ 'View node page'|t }}&lt;/a&gt;


in which you need to use the route to edit the node: entity.node.edit_form