"I went on a weekend trip and didn't invite friend A, so I hope friend B keeps it a secret and doesn't tell anyone I was there" is the kind of social dynamic that people grow out of in high school. If you are having trouble with it as an adult then it isn't really Instagram's fault. People talk to each other and share stuff, and sometimes they talk about you, both online and offline. Just live your life without being…
As a more general example, you wouldn't talk about a happy hour you were going to after work with people who weren't invited/aren't invited/you wouldn't invite. I believe every sitcom on the planet has at least one episode with this lesson in it.