As described, you are perhaps attempting to edit a photo, perhaps to remove unwanted areas of the photo. If so, Markup is the wrong tool for the job. Instead, you will need to use a photo editing App - such as Pixelmator, Adobe Photoshop or Affinity Photo 2.
Markup tools essentially add new elements to an existing document/picture - in a similar way that you might add sketch marks or a written note (using a regular wooden pencil) on a paper photograph. You can erase the pencil marks that you have added, but not the underlying parts of the original document/picture.
When using the iPad's markup tools, you are adding electronic "markup" as a layer to an underlying photo, picture or other document. The markup eraser can only remove markup elements that were added using the markup tools. However, markup tools cannot edit the original picture - and is not, of itself, a picture editing utility.