but a ship is not able the take that path
Hmmm, I have a few theories based on what you mean by this. But assuming that you have SSEdge unlocked as a space location, and the problem is that ships prefer to take the route through aquilo instead of taking the direct path; I would ask to check the distance values for those two routes.
I get the feeling this issue might be related to this weirdness that was reported a few months back, regarding the distance values between the outer planets (even without Outer Rim installed).
I'll look into this later tonight, but knowing the distance values would help; if the route between Secretas and SSEdge is longer than the distance between Secretas->Aquilo->SSEdge, then of course, ships will take the shorter path. If it's not that, then I'm not sure