How can I modify the element on all pages?

The <header> elements are usually echoed directly by the theme. So without any hook or filter to change them. In that case, there is no way to change those elements with a function. Check your theme.

You could, of course, use javascript to place you attributes, but that would happen on the user end. Search engines would not see it. Since schema.org attributes are meant for search engines that is pretty useless.

What you could try is buffering the whole page and do a search and replace right before the page is completed. This is likely to run you into serious difficulties, but theoretically it’s possible.

So, your best course of action is build a child theme and replace the part where the <header> tags are generated with your version. You would have to make a child theme anyway if you were going into the direction of a custom function as you suggest.