I have a rosemary plant inside. Should it be transplanted if I think that the pot is too small?
Yes. If the plant is so big that it threatens to topple, or if it seems to need water every day or so, or if the area inside the pot is completely filled with roots which retain the pot-shape when you pull the plant out, it's time to repot. Here are some tips on repotting: https://www.gardeningknowhow.com/houseplants/hpgen/learn-more-about-repotting-houseplants.htm
and a few words on growing rosemary indoors: