Applying for SverigeID is optional if you are applying for a national ID card. In that case, you will need to tell the staff at the police station that you also wish to apply for SverigeID, the government-issued electronic ID.
If you apply for the ID card for noncitizens registered in the Swedish Population Register it will include SverigeID, the government-issued electronic ID, without you having to ask.