The exact difference in meaning can vary depending on context, but here is the most likely difference.
First sentence
The first sentence offers the speaker's opinion: "no". It's a polite manner of speaking. Here are some other ways to say the same thing:
If you ask me, I would say no.
If you ask me, no.
I would say no.
In my opinion, no.
No. [This is blunt. It could be heard as impolite, depending on the context.]
In other words, "If you ask me" and "If you asked me" are a common idiom for introducing the speaker's opinion. It avoids suggesting that other opinions couldn't reasonably differ. "I would say" is another idiom for softening a statement of the speaker's opinion.
By the way, the "if you ask me" idiom has a special rhythm: the syllables of "ask me" are extended longer than usual and given equal stress and equal time (or even double time for "me"). When using "I would say" to introduce an opinion, the "I" is stressed and usually lengthened, emphasizing that what follows is only the speaker's opinion.
For expressing an opinion, "If you ask me" is most common in the simple present tense. For that reason, the past-tense form, "If you asked me," is also a way to reinforce that the speaker is talking about a hypothesis and not offering a personal opinion:
If you asked me if you could stay up until 2:00 a.m., I would say no, because I'm only your baby-sitter and I can't give you that kind of permission. If you ask your father, he might say yes.
Here, the topic is asking permission. The tenses shift in the second sentence, because the first sentence describes a generality and the second sentence suggests something the listener could do in the future.
The "my opinion" idiom can be put into the past tense to suggest a change of opinion, or to emphasize that the speaker's opinion has not changed:
If you asked me in 1993, "What level of confidence do you have that this economic plan is going to work," I would say very, very high. [Bill Clinton, telling how his economic plan worked better than he expected.]
The word would in the consequence suggests that the speaker frequently stated this opinion in 1993. It can also suggest, "See? I was right." This exploits the sense of would meaning habitual activity—even though here it's not describing activity, it's suggesting constancy of opinion. If the speaker were describing a change of opinion between the past and now, he would likely reinforce that interpretation by saying would have said instead of would say. As usual, there is no rule, there are only a variety of familiar expressions that people call upon to favor one interpretation or another, as explained in more detail in a similar question.
Second sentence
The second sentence emphasizes that asking the speaker's opinion is itself a hypothetical scenario, which might influence the result.
If you were to ask me if I would buy Febreze-brand dog food, I would say no. But if I saw it in the grocery store and they were out of everything else, I might buy it.
In other words, moving ask into a subjunctive clause makes the asking a hypothesis, and indicates that what follows would is a consequence of that hypothesis. The speaker is not merely offering an opinion, but making a claim about the difference between being asked about his behavior and his real behavior. The second sentence reinforces the difference between his likely false self-report and and his likely real behavior by using a weaker way of indicating that a verb is hypothetical: putting it into the past tense.
Another way to accomplish the same thing is to use intonation:
If you ask me if I would buy Febreze-brand dog food, I would say no. But if I saw it in the grocery store, I might buy it.
Of course, you could also say "If you were to ask me, I would say no" as a longer, extra-gentle form of the idiom for gently offering an opinion.