You can ask. It's not likely that your request will be granted, but it's not impossible. Keep in mind that the editor's default assumption will be that you are simply disgruntled by negative reviews -- every single author who receives a rejection is convinced that it's because the reviewer is incompetent -- so you need to show why you're different. You will need to make a strong case that the reviewer is actually incompetent, not merely that you disagree with them.
That means you will need to point to incontrovertibly wrong statements they make. If they say something that 90% of the field disagrees with, that's probably not enough, because it may still be a legitimate minority opinion. Similarly, if their statements have any qualifiers, the editor is more likely to side with them. And it needs to be central to their review, not a side point. Basically, you need to leave the editor no room for subjectivity in deciding that the reviewer is incompetent.
It's probably not worth the trouble, unless you have strong reasons for really wanting that particular journal for publication. Keep in mind that the stronger the journal, the more trust an editor typically places in their reviewers, so you'll need to make a really strong case.
That said, I've seen it happen, so it can be done. Editors make the final decisions. They very often do deprecate one reviewer's opinion. But again, every author believes the same as you do, so you'll need to show objectively why you're the one in a thousand exception.
Edit: From the comments "it is based on the assumption that the review and the editor's decision are negative. It would be great if you could include the other scenario as well, which I am more interested in."
This makes it sound as if you sent in a paper that you suspect is incorrect or incomplete, and you want reviewers to point out the errors that you believe are there. This seems like an inappropriate use of the peer review system. The peer review system isn't a free editing service for you. It isn't a way to avoid having co-authors, or to get someone to hold your hand and walk you through a field for nothing. If you have doubts about something in the paper, it's your responsibility, not the editors', to find someone who can reliably identify and fix problems.
If the reviewer approved the paper, but you don't think the reviewer was competent and you are concerned that there are still problems with the paper, then you shouldn't ask for another review, you should withdraw the paper and fix it yourself. If you can't do it yourself, then get a co-author who can, or at the very least have a colleague review it for you.
Edit in response to the question being revised. If the review is positive, but the reviewer shows that they are not familiar with the topic to the point that the review is completely useless, I would not request a new review. The editor is supposed to be familiar enough with the field herself to understand this, and to deprecate the review or calibrate its impact appropriately. Telling the editor that the review is incompetent and requesting another review would be pretty insulting, telling the editor that they are incompetent themselves.
What might I do in the case of an egregiously terrible review? The same as I do with a good review. Even if the paper is accepted, there's a response-to-reviewers letter, and you can use this to politely and professionally indicate that the reviewer is incompetent. Just as I said above, be objective, find points that are irrefutable and unambiguous, and show that the reviewer is completely wrong. I can't overemphasize that you do this professionally. It's the same thing you do with every response to a reviewer -- show where they're right and where you're right, and why. You never say that the reviewer is incompetent, because that's unprofessional. You simply show that they are objectively wrong. The editor should pick up on this and understand that if every point the reviewer made is objectively wrong, they shouldn't use them again.
Finally, get over it. Bad reviews are a part of the job. It's hard for editors to find good reviewers. Almost every paper I've submitted has had at least one bad reviewer. I've seen scores of stupid, inane, missing-the-point comments. Get annoyed for a few minutes if you want, but don't take it to heart.