Can an undergraduate be advised by a professor who is very far away?
It's probably not impossible, but distance isn't the only impediment. If you want her to be your formal advisor then you may need permission from both universities and they may need to work out some compensation, depending on the rules. This will be especially the case if she needs to formally approve (perhaps sign) your dissertation. 

Distance is a problem of course, but with today's communication options it can be overcome in such a case. But you should also consider the possibility, even the necessity, of working face to face on occasion. One way to do this is through attendance at a conference with an extra day or so to work after or before the conference itself. There are other options, of course, including trying to get a small grant from somewhere to cover travel - either yours or hers. 

But asking is certainly appropriate if you are willing to also work to obtain the necessary permissions and deal with the distance issue. 

If she is to be only a secondary advisor it is a bit simpler, but needs the buy-in from your main advisor at your current place. This is easiest if the two know one another and are comfortable working together. But there may still be permission and compensation issues to deal with. 

Make sure you know at the start everyone's expectations about joint authorship of anything you produce, of course.