Indeed, what you can do is to have a second image that contains the selection. First fill it with black. Then when there is a click, check that it is within a tooth (that it is white) and then do a parallel floodfill in white on the selection image.
You can draw the highlighted selection different ways, for example by calling FillMask on the display image to give some color to the selected tooth. If instead of highlighting the tooth, you want the border of the selected tooth, you can use Contour filter on the selection or EmbossHighlight filter.