You can create a normal stroke in a different layer and erase where ever you don’t want the stroke visible.