For ticks on both side a workaround would be to draw the line again from other end
create_ruler_in(x1, y1, x2, y2,title="",tick_dis=10)
create_ruler_in(x2, y2, x1, y1,title="",tick_dis=10)
And for distance set
ruler.SetRulerMode(True)
ruler.SetRulerDistance(#distance you need)