Ok let's start from the beginning.
transform.position is
world space, which you shouldn't be using it at all. Touch position is in screen space:
UICamera.lastTouchPosition.
Take your widget's cachedTransform.localPosition and apply the UIWidget's pivotOffset, scaled by the transform's scale:
cachedTransform.localScale.Scale((Vector3)widget.pivotOffset);
...this gives you the pixel-size pivot offset that you then add to your UIWidget's cachedTransform.localPosition to figure out the actual origin point (top left corner).
You may then need to add parent transform offsets leading up to this widgets if you've moved one of the parents. Make sure to add up
localPosition, never transform.position.
Now that you have true screen-coordinate full top-left corner, the rest should be easy.