Grammatically it is correct. Can is one of the modal verbs (can, could, would, should, shall, will, might, must and may). The way you figure it out is through subject-auxiliary inversion. Just do it backwards and forwards as a question and a statement: "Can I give you some advice? or "I can give you some advice." The problem here is that they almost always sound correct as a verb in a sentence or question, because they express opinion, or ability to do things. In this case because you are asking permission, you should use "may I" as in "May I offer you some advice." However, you can say "can I give you some advice." It would not sound weird to a native speaker. "May I" would be a more polite to ask. Does this help? Or should I do this again? I can, if you would like. You hear them a lot in English; look how many I have used! Just listen for them, and you'll figure out where people often use them when speaking. In this case, you should use "May I."