1. Ask your friends for help, and they will help you.

2. Ask for your friends' help, and they will help you.

3. If you ask for your friends, they will help you.

(Are they all grammatical and the same?)

Only #1 is correct.

Yes, all three sentences are grammatically correct and convey the same meaning. They all indicate that by asking for your friends' help, they will indeed assist you. The difference lies in the phrasing and word order used to convey the same idea.