Apparently, it was not in the script. He just decided he was going to do it. The tears were real, although apparently no sodomy took place, because the actress felt shocked and humiliated.
I bet he rubbed his cock between her butt cheeks though; she was plainly very upset about something. What a beautiful ass Maria Schneider had!
A great scene! Here we are still talking about it 50+ years later.