<td class="order-number" width="1%">
<a href="https://wordpress.stackexchange.com/questions/190318/<?php echo wc_get_endpoint_url("view-order', $order->id, wc_get_page_permalink( 'myaccount' ) ); ?>">
<?php echo $order->get_order_number(); ?></a>
</td>;
this should solve your problem.
But I am not sure which template your are modifying, but fool proof way is only possible with child theme (functionality plugin will be complex for your needs).
https://support.woothemes.com/hc/en-us/articles/203105897-How-to-set-up-and-use-a-child-theme
http://docs.woothemes.com/document/template-structure/
both of these should help you get started with child theme.
Note: Make sure you permalinks are set to Pretty permalink not default under section
WP Admin -> Settings -> Permalink -> Go to section named “Product permalink base” and make sure of that.