Rule of thumb is that a result takes the same number of significant figures as the input with the fewest significant figures.
You are correct in that for your measurements of
9.8 g, 9.9 g, 10.1 g, 10.2 g, 10.3 g
the values of 9.8 and 9.9 have two significant figures, and the values of 10.1, 10.2 and 10.3 have three significant figures. Although nothing changed in your measurement nor in your apparatus, this is still possible as we see here.
One way to check how many significant figures are in a value is to put it into scientific notation, i.e. use exponents. Thus 9.9 becomes $9.9\times 10^{0}$, which has two digits and hence significant figures, 10.1 becomes $1.01\times 10^1$, which has three digits and hence three significant figures, whereas 10.0 could become $1.00 \times 10^1$ with three significant figures, or $1.0 \times 10^1$ with two significant figures, or $1 \times 10^1$ with only one significant figure. In this you could preserve the level of precision by using $1.00 \times 10^1$.
Why? Because the zeroes are only significant if they have another digit on both ends (except when using scientific notation). This is why 0.1, 0.0001 and 1,000,000 all only have one significant figure - because the zeroes do not have other digits on both ends. On the other hand, 1.1, 1.0001 and 1,000,001 have two, five and seven significant figures, respectively, because the zeroes are surrounded by other digits.
Then, if you take the mean result: $\frac{9.8 + 9.9 + 10.1 + 10.2 + 10.3}{5}=10.06$, but of your input values there are some with two significant figures and some with three significant figures, so you would take two significant figures as the reliable precision of the result. This means that your result cannot be (accurately) stated to more than two significant figures.
The result of 10.06 has four significant figures, which breaks this "reliability rule", and rounding 10.06 to the next decimal place makes it 10.1, which is three significant figures and still breaks this "reliability rule", but rounding it further makes it 10, which is one significant figure. So, what to do in this case? I would call it 10.1 and err on the side of retaining the same number of decimal places, i.e. preserve the precision.
Given another data set containing e.g. {9.7, 9.7, 9.8. 9.9, 10.1}, for which the average would be 9.84, the result could be then rounded to 9.8 as two significant figures.