I am drawing a block diagram. I need an arrow pointing to a rectangle. However, the arrow poke the rectangle even though end point is snapped to path.
What I need is the arrow to just touch the border.

The problem here is that the tips of arrows (the Markers) are not actually part of the curve or line but rather an overlay whose properties are a pain to change (there are several issues with the functionality of arrows, such as assigning colours and resizing though there are workarounds).
A possible solution is to transform the arrow to a path (Path > Stroke to Path) which gives you more freedom in resizing, snapping etc. However you loose the possibility to easily change arrow tips (e.g. of multiple lines at the same time).
A solution is to enable "snap to edges of a bounding box" The arrow still goes slightly beyond the bounding box (don't ask), but it is good enough for most arrow purposes.