"I can't drink milk, but I can drink soy milk."
Is that what you tried to use instead of 可以? Because 不能 would imply that you are physically incapable of drinking the milk, like you're a quadriplegic or maybe your milk is gone or placed behind a force field, thus making the action impossible to perform. From the sentence, it is implied that you are physically capable of drinking since you can have the soy milk, thus the action is not obstructed and you can't say "不能“. The real sense here is that the speaker is not allowed, or mustn't drink the milk. Not that they are unable to do it. (Even if they have a serious allergy)
Sort of like if you were at school and you asked if you can use the restroom, and the teacher responds "I don't know, CAN you?". Instead expecting you to say "MAY I use the restroom?"
I agree. In fact, it's hard to think of any circumstance in which the contrast described would not be one where 能 wouldn't make more sense than 可以 here. It is precisely physical incapacity that generally prevents people (especially people of Asian background) from drinking cow's milk. (And, with respect to Ferrago, the idea that a person with an allergy MAY not drink milk, but CAN is an abuse of language. One might as well say, "I MAY not drink battery acid - but I CAN!"