Well, it depends.
First and foremost, ownership is retained by the photographer. Whether you work for an agency or a marketer, when your company purchases a royalty-free stock image, that company becomes the licensee for the image (not the owner). As the licensee, you can use or manipulate that image as you wish. If an agency buys an image for a client’s project, the agency can use it on their customer’s behalf. Use of the image is typically unrestricted, i.e., it can be used in multiple deliverables for the client. And in terms of cost, an image is usually priced based on its file size or resolution.
Quite often, agencies (and sometimes marketers) have bulk stock image agreements with one or more stock photo houses they use regularly (e.g., Getty Images, Shutterstock). These purchase agreements allow agencies to buy images at a predetermined, negotiated rate based on their anticipated download volume. With these agreements, images must be licensed to the purchaser, i.e., the signer of the agreement.
When the agency purchases an image, the client who receives a manipulated image as part of a project does not have rights to the original stock photo. In this circumstance, the client can only use the images purchased by the agency in the piece of original work developed by the agency. Additionally, the stock photography files cannot reside on client servers in any form other than in the work created by the agency or licensee. If the client wishes to use the image for a different purpose, the agency (as licensee of that image) must create new or revised work on their behalf.