If it WILL rain, I will buy an umbrella.
'비가 오면 나는 우산을 살거야.' is more natural.
When we ask somebody to do somthing, we use this enging
'~ㄹ거면' '~거든' So the subject of next clause is another person ,not 'I'
For example,
자리에 없을 거면 메세지를 남겨라. If you are absent ,leave a message.
비가 올 것 같으면 밖에 나가지 말아라. If it rains, don't go outside.
그를 만나거든 나한테 전화하라고 말해줘. If you meet him, tell him to call on me.