When using themes on a WordPress site, can I customize (I mean modify/change files) that makeup the theme? So as to remove a particular section on stock photo provided in the pages?
I like certain themes, but most of them include a footer, header, or something somewhere with extra information I would not want displayed, i.e.) theme name/version, developer link, etc.
Is it ok to remove those from displaying on the website?
Well, this is totally up to the theme, its author(s), and the licence that the theme should be accompanied by.
WordPress itself is published under GPL(v2). A huge amount of themes and plugins is too. Or at least a similar licence (e.g., MIT).
But in every case: What counts is what the product is shipped with.