You can definitely get a pimple on the skin of your scrotum. This can occur because the skin is moist and under a lot of friction from the skin of the thighs, which can lead to irritation and predispose to pimple formation. In addition to pimples, ingrown hairs also commonly occur in this location. Both pimples and ingrown hairs should resolve on their own with some good skin hygiene, however if the area you have found is very painful or if there is any spreading redness or inflammation, then you should go see your primary care doctor
Given the location and description of the spot, it is unlikely to be a sexually transmitted infection, since sores from these tend to occur more often on the head and shaft of the penis. However, genital warts
can occur on the scrotum. Therefore, you should make an appointment with your primary care doctor. They will be able to look at the spot and quickly determine whether it might be a sexually transmitted infection and, if so, what should be done next for treatment. Good luck!