The most polite way to respond to someone asking, "Can I ask you a question?" is to affirmatively acknowledge their request while being open and receptive. Here's a polite response you can use:
"Of course! I'd be more than happy to answer your question."