this could be one of three things.
1) a fatty lump. witch speaks for itself, it is simply a piece of fat that has attatched itself to the skin, and is nothing to worry about,.
2) a cyist...witch may need medical attention. caused from grass seed or infected scratches.
3) a cancer growth, usally the soft ones are more worreying than the hard ones, but if youve got it early it shouldnt be too abad.
concidering you said it hurt a litte, i'd say its either 2 or 3.
give it about a week from the day you found it, and if it hasnt gone away or gotten any smaller then take him to the vet.
if its a cyist, it wont cost more than the consult fee. if its cancer its bette rto know while its still small and easily treated.
hope it goes well.
It could me a cyst a abscess and ingrown hair a infected bite i would go to the vet to have them make sure what it is so your dog can get the right treatment for what every it is when in doubt visit the vet .If he flinched it hurts you want to get hlp befor it gets worse and he will be in a lot of pain.