How can I avoid learning secrets at a research internship that would block me from legally pursuing research interests after it's over?
You should take the internship - congrats on that. Yes, you may learn some stuff that is proprietary to the company - it will be quite specific, and far more application oriented than anything you are likely to do in grad school. Working there will give you some good ideas about how things work in the real world (the fanciest ideas don't always produce good results). Finally, they know you are an intern - the probably won't have you working on the deepest darkest proprietary stuff.

You are not now, and will not be, the first or last student intern at a company that has proprietary information. Just be clear, before you go, what they consider as 'theirs'.