の doesn't work as "to" here. Instead, Xのおかげで translates as "thanks to X". What's the difference? It's that English and Japanese express the idea of attribution differently. In English, you talk as if you were expressing thanks, and this gratitude is directed "to" the person responsible.
What about Japanese? Kage originally means "shadow". At first, it was used like this in a religious context, where it refereed to the influence or protection of a god or spirit (source). That's why it always comes with an o- honorific. With time, the word lost the religious overtones, and just became a way of saying "help, patronage, effort". So 友達のおかげ means "friend's help", "friend's patronage", "friend's efforts".
The first で isn't about connecting sentences. It's the で that indicate how, in what way, by what means: it was through/via (で) his friend's effort/patronage/help (友達のお陰) that he could see the movie.
おかげで is a set pattern, and you can think of the whole thing as an equivalent to English "thanks to".
を is the normal particle in this case. The が particle marks the subject of the verb (who does the action), and を marks the object (what undergoes the action). If I eat the apple, I am doing the eating, and the apple is the thing being eaten: 私がりんごを食べる。
The verb here is 見られる: to be able to see. What was it that he was able to see? The movie. The movie is the object, so it's marked by を.
But what about は, you say? Well, は is a tricky particle; it marks the topic, that is, what you want to talk about.
- おばさんは、 As for my aunt… (she's gone / I hate her / etc.)
- りんごは、 As for apples… (they're cheap today / they give me allergies / etc.)
The topic can be the subject, and in this case は overwrites the particle が:
- 私が映画を見た。 I saw the movie.
- 私は映画を見た。 As for me, (I) saw a movie. (I don't know about you guys, but as for me, I watched a movie.)
The topic can be the object, and in this case は overwrites the を:
- 映画は私が見た。 As for the movie, I saw (it). (I haven't read the book yet, but as for the movie, I saw it.)
The topic can be other things too, neither subject nor object:
- 私はピザだ。 As for me, it's pizza. (Betty's having pasta, Veronica's having salad, and as for me, I'm going with pizza tonight.)
Why を instead of は in your example? Because 映画 is the object of 見られた, and it's not the topic.
で here also means in what way, in what manner; it ties to ただ "free of cost". Basically ただで translates to English "for free".