Let's assume you are attaching media from the Edit Person screen and then from a "source" under the Edit Person screen. Click on the Media button on the Edit Source screen to get to the place where you can add media files. There is a button where you can select Source Only, Detail Only, or Source and Detail. This button has two effects. First, the button controls the display of media that are already there and displays media attached to the Source only, that's attached to the Detail only, or that's attached to both - depending which way you set the button. Second, the button controls how new media you add is attached. Source Only attaches only to the Master Source. Detail only attaches only to the Source Detail. Source and Detail attaches only to the Source Detail. As far as I'm concerned, that is a bug that needs to be fixed in RM8. I think the Source and Detail button should add to both, but it doesn't.
The default for the button is Source and Detail, so you are probably only attaching to the Source Detail. After attaching a media file to a "source" in RM, you can look over in the right hand panel to see if it was attached to a Master Source, to a Source Detail, or to both. The way you can tell is to look at the icons. For a Master Source, you will see a "source icon" with no words and the absence of words is a terrible design. For a Source Detail, you will see what looks to me like the exact same icon except that it also has the word CITE associated with the icon. The addition of the word CITE is very helpful. For both, you will see two icons, one of each kind.
In any case, you can see what's going on with the RM side of the house. Perhaps it's not so easy to interpret what you are seeing with those icons, but you can figure it out. From there, I'll have to leave it to you to figure out where the media goes in ancestry when you TreeShare it to ancestry. Surely it depends on whether you have attached the media to the Master Source in RM, to the Source Details in RM, or to both in RM.