I guess you could, but consider the ask. As an undergraduate, you are making a request that extends far beyond just offering your presence or just being an extra set of hands.
While it may not seem to be a big deal from your end, realize that you are actually asking for training, mentorship, authorship, a letter of recommendation, and all of the other things that come along with working in someone's lab. If they are tied to an institution (most physician-scientists are), there may be paperwork, compliance training and onboarding, etc. to slog through. Some universities will even expect PIs to dedicate some part of their grant to support the student.
I've met physicians who genuinely want to help but feel overextended and come to resent shadows in a very "no good deed goes unpunished" kind of way. If they allow someone to shadow them but decline more engagement, they know they are just the "jerk who didn't want to write them a letter," or whatever. The cumulative effect of this pressure is that physicians become less likely to want to interact with pre-meds at all if they are not able to take it all the way.
The asymmetry of responsibility is massive, and if you notice, everyone saying that it "doesn't hurt" is only really speaking from their own vantage. Of course it doesn't hurt for you, as one person, to ask. The core problem emerges when every pre-med thinks that way. If 4 hours shadowing is enough to ask, why not 2 hours? Why not in the first few minutes of meeting? Why not just swipe right on Tinder on everyone wearing a white coat and ask in your opening message? You can see that "doesn't hurt" mentality can be stretched in increasingly absurd ways. At what point do we say it is inappropriate? (Asking for a friend.)
Even if you're not asking for those things upfront, a physician (who had to go through this song-and-dance themselves) is going to recognize the subtext, even if you think you're being evasive or noncommittal.
That's why I think you're very unlikely to get a positive response if you ask someone you have presumably just met and shadowed once for a few hours. It would be a different story if you had more time working together and could talk more openly about your goals and they showed interest in facilitating your path.
Social psychology teaches us that a better way to achieve your goal of landing a research position would be to exploit the foot-in-the-door effect. Ask for something smaller. Maybe more time shadowing? A coffee to chat about your path, if they are willing?
If you really want this particular opportunity (and not just any lab that will take you), you'll need to go about it in a more emotionally intelligent way.
In a way, the subtextual ask is "will you care about me, as a person and developing professional?" I think, if I had to ask, I would approach it by showing, through my thoughtful, considered behavior, that I care about them as a person and professional. Ultimately, you are seeking to garner personal goodwill, and so your primary levers here are relational.