Acess a texture/sprite specific pixels area

Is there any way to acess a specific area of a texture/sprite and only use that area? I’ve searched but couldn’t find anything related to this topic.

To access it, use Texture2D.GetPixel or Texture2D.GetPixels.
To only use that area, use a masking shader.