Part of your problem is that you are too focused on being polite and nice to him. I realize that women are socialized this way. But in 40 years in the workplace, I have never once seen a man let a situation like this get to this point. I have seen a lot of women, including myself when I was young, get into this kind of situation. You need to be less concerned with his feelings and more concerned with your professional reputation.
I bring this up because he is not the only person causing this problem. You have allowed it go on. You need to examine your own response to things like this and learn to be assertive from the beginning or these things will continue to happen to you.
I was terrified the first time I had to smack someone down who was harming my professional reputation. But after I did, I realized that it wasn't as bad as I thought. And if you stop things the first time they happen, you get a lot less of this sort of stuff. I am polite and kind to just about everyone at work, but no one there tries this nonsense on me because they know they will regret it if they do. I won't start a problem with someone one else, but I will not let anyone get away with putting me down either.
This is a book you should read to understand how your communication techniques may be undermining you and how to fix that.
At this point strong action is necessary. Personally, I would talk to my boss about the issue. I would show him exactly what I have done and talk about how the person is trying to show you how to do parts of the task you have finished. I would ask him to code review what you have done to make sure your boss is in agreement with your methodology. I would discuss What you have done to try to get this guy to back off. I would discuss the impact on the project schedule. The I would discuss what he needs to do to help solve this problem. At this point, you likely need management help to get this guy off your back and, more importantly, to get him to stop ruining your reputation. The boss needs to publicly support you. He needs to make it clear that you have his confidence. If your boss won't support you, then you have a much larger problem.
The boss needs to privately discuss the issue with the guy and tell him in no uncertain terms that he is out of line in his behavior and that throwing other people under the bus will not be tolerated. He also needs to make it clear the he has authorized you to respond in kind if he does this.
Then, with the boss, develop a plan for if he spouts off again at the Scrum meeting. I would suggest that you immediately state that you didn't ask for or need his help and that he is preventing you from doing your work effectively with his constant unwarranted interruptions. Then your boss should question him more closely about his progress on his assigned tasks. If you and your boss coordinate this way, he and everyone else will know that you are fine and he is in the wrong.
Edited to add:
In a comment you said, "My boss responded by bringing up that he has done this with female coworkers before I started working here, but he laughed it off as "That's just how he is."
This is a serious problem you must address as well. Your boss needs to tell him in no uncertain terms that he will not treat female coworkers as incompetent and that he will not disrespect their work. This is harassment. And it is something he should be fired for if it continues. It is not just how he is. It is how he is not allowed to be ever again. He doesn't have to like it, he doesn't have to like you. He has to treat you the same way he would treat a male coworker of the same experience.
I have a male coworker whose religion tells him that it is immoral for women to work, yet he works very effectively with me and I do with him because we are both professionals who understand that our personal feelings about each other are irrelevant to getting the job done that we are paid for. If that guy can do it, your guy can do it.
In fact your boss is condoning the harassment by laughing about it and is also legally culpable as a result if you choose to sue. I would in fact suggest that your entire workplace probably needs some training in sexual harassment because your boss's response is part of a pattern of harassment as well.
I worked for the Navy in the 1980s when the Tailhook scandal happened (look it up in Google). The Navy at the time was pretty much the epitome of a harassing environment. I was frequently grabbed, I had a boss who used swear words quite literally every other word, one woman that the men disliked they did something so disgusting to her I can't even spell it out here, I was physically assaulted at work, people made frequent remarks about my bra size and physical attributes, and on and on (It would take hours to describe all the ways this work place was harassing.) But after Tailhook when management got serious about cleaning up the environment, things got a whole lot better. (From what I have read, I think this has gotten worse again. Some battles have to be fought multiple times.)
When managers don't stick up for their employees who are female, gay, black, Muslim, etc. then the workplace often descends into a chaos of subtle and overt harassment that is simply unacceptable in the 21st century. Your boss is now aware of the issue and it is up to him to provide a safe work environment free of harassment to you. If he cannot do that or chooses not to try, he is also harassing you and also should be fired. He is exposing the company to legal jeopardy that could be costly by not taking action when the problem was reported to him.