Yes, a sorcerer can know two 9th level spells at level 17
Additionally, when you gain a level in this class, you can choose one of the sorcerer spells you know and replace it with another spell from the sorcerer spell list, which also must be of a level for which you have spell slots.
That is exactly correct. When the sorcerer hits level 17 they can learn one new 9th level spell. And since they now have a 9th level slot, they can replace an 8th level or lower spell with a 9th level spell if they so desire.
Note that they could even replace a 1st level spell with a 9th, it need not be an 8th level spell.
It may not be the best idea1
Sorcerers have limited spells known. Upgrading another spell to a 9th level spell will guarantee that one of those 9th level spells will not be able to be cast per long rest. If you intend to do this, be sure that it is the wisest use of your resources.
1- Thanks @András