If you want to include the sprocket holes when scanning 35mm film, there are a number of ways to do so. Assuming you have a medium format film holder, you can try to to use that to hold part of it. You may want two pieces of cardboard and sandwich the film between it and place that on the glass or into your medium format film holder.
I have had success making numerous custom film holders from magnetic sheets. These are commonly sold at office supply stores and are designed to be printed on and cut out to shape for custom magnets. I cut out the size needed from two of them and lay one other the other to keep the film is position. It works very well though it can be a bit fiddly to position the film.
Lomo sells an item called the DigitalIZA which is an ingenious film holder designed to facilitate the process of scanning sprocket holes. It works quite well with a clever system of loading in the film. If you want the easiest method and don't mind spending $35, then that is the way to go.
On the opposite end of the spectrum is simply taping the negative directly to the glass. That works, but you will end up cleaning the glass a lot due to the inevitable fingerprints and tape residue.
It is important that your film is very flat when attempting to scan the sprockets. Especially if you are using a DigitalIZA. I find the best way to do this is to place your film in a large book with a few books stacked on it overnight.
NOTE: Be careful not to cover the area of the flatbed scanner that is used to calibrate itself. If you look at your film holder, there is likely a little notch with some sort of 'do not cover' indicator on it. When you use any of the methods above, just be sure that you don't cover the corresponding area on the scanner.