"Can you help me to buy medicine?"
All three (帮, 帮助 and 帮忙) can be used as verbs to mean help, assist or do a favor. Only 帮助 and 帮忙 can be used as nouns, 帮 can not. As a verb 帮助 and 帮 can take an object, 帮忙 can not.
帮助 is preferred in written Chinese. 帮忙 and 帮 are more commonly used in spoken Chinese. And 帮 is most perfered, perhaps due to syntactic simplicty.
Some people think there is a differnce in meaning: 帮助 means to assist 帮忙 means to do a favor But some other people disagree with this.