You could also say to switch up what scrum means if you're having trouble -- to be honest I've never considered the idea of just ending the sprint early (and rescheduling the sprint planning meeting!), I'm skeptical than any of the "Certified Scrum Masters" I know have either... But it still can't be done if you are finished early but the rest of the team isn't. My team didn't really have a problem with taking on work assigned to someone else so long as that work wasn't started yet, but things get tricky when all the work assigned has been started by someone. A solution in that case does present itself besides just bringing in something new, it's the same solution as kanban when the buckets are full: join another developer on their story and pair (doesn't have to be "formal" pairing even) to get it done faster.
But you've highlighted another problem with the whole mess, that being ownership accountability. Lack of visibility outside of the standup meeting into what Dev B is working on when they're paring with Dev A (who is the sole "assigned dev" in the tracking system) is an obstacle to incentivizing pairing. Sometimes you need that visibility. On an old team I left because of terrible management, there were just two of us devs at one point. One sprint it turned out that my face was on the dev column for almost all the items, the sprint before it was my coworker's face, in reality we paired on almost everything. But that second week my manager (who never joined our standups) asked "What are your thoughts about Dev A's work performance? You seem to be doing everything right now." Management memory was sprint-to-sprint. This isn't a problem with scrum, of course, though it does enable that problem to surface where at least in a kanban style you'd have the giant column of closed things having a mix of faces.
What I have seen mostly, is that the devs finish early (about 1/2 or 3/4 into the sprint), and wait for QA. And so, QA is idle at the start of the sprint. Bleed-over was then just accepted and incorporated, while I was not sure of the usefulness of "sprints" anymore.
Maybe as the replies suggest, it gets dev-done in less than a week despite the longer estimates, and if you're lucky QE picks it up and closes it before the end of the next week. The usual outcome for these types of stories is that one or the other takes longer, or the sprint was packed with too many 2-3 day bits of work that kept getting prioritized over QEing the big one, and now you have bleed-over as you push it to the next sprint (along with any 2-3 day stuff that you started on Friday because you were free). Bleed-over is the normal way you get > 2 weeks of work stories done, and is also a consequence of smaller things not perfectly fitting into the two week period as well.
My team had these problems with the scrum process and switched over to a kanban style a couple years ago, it's been better for everyone. Because of the concept of WIP limits at each major stage in the pipeline, we get parallelism where it matters -- i.e. people unclogging the pipe: if the WIP limit is reached for dev-in-progress work and someone is looking for new work, it has to be something later in the pipeline. Because we don't do things in chunks of 2-weeks, if something takes longer than 2 weeks to get through the complete pipeline, no biggy, some work is just optimally sized for one person to spend a few weeks on to do the best job. (But that ended up happening less because of the WIP limits helping to force us to get things through instead of sitting around in one state forever.) And if you want to start something new on a Friday, no biggy, we don't have to argue over bleed-over and trying to optimize the bucket of new things per sprint for the next sprint with the other rule of not bringing in new things. (Sprint models are so obviously defective when you've finished up everything in the sprint on a Thursday morning. What are you going to do for the next day and a half if you have the rule that you can only add stuff to the board during sprint planning? Well the answer some shops give is you add something anyway, and it immediately bleeds over, and then you get criticized for bleed-over.)