Yes, it is absolutely necessary to obtain permission from the photographer to republish their photo on Ancestry. If you canNOT contact the the photographer, do NOT add the photo to Ancestry.
Find A Grave policy:
http://www.findagrave.com/cgi-bin/fg.cgi?page=listFaqs#143"I found a photo of a relative on Find A Grave, can I use it?
Photos posted to memorials on Find A Grave are copyrighted by the member who submitted the photos. Lifting the photo to use elsewhere would be a violation of copyright. You must obtain written permission from the member to use any photo for your own use. In general if you did not take the photo yourself, you do not hold the copyright to the photo."
Ancestry's policy:
http://trees.ancestry.com/SubmissionAgreement/Multimedia"You should submit only content which belongs to you and will not violate the property or other rights of other people or organizations. We are sensitive to the copyright and other intellectual property rights of others. Be aware that content, including photographs, even if submitted to a site of which you are a member, belongs to the creator or submitter and you should not reproduce it without permission of the owner..."
and
"Rules for Conduct
You must not use Ancestry's products and services to:
...
B. Post, transmit, or display content which is protected by copyright or trademark or that does not belong to you and that you do not have authorization for use from the owner of the copyright or trademark, including but not limited to email messages and notes in GEDCOMs. Read our copyright policy if you have questions."