Could Swedish and Norwegian coastal-defence ships have caused a major navy serious blockade or invasion problems?
Short answerYes; they could force the attacker to deploy full battleship groups, and timely Norwegian mobilization in 1940 would have made the German landing much harder.
NotesSwedish coastal ships could have complicated British blockade plans because cruisers alone would not be enough. A hostile navy would need battleships and supporting screens in every group that might meet a concentrated coastal squadron. That force-multiplication effect could turn a coercive deployment into a major fleet commitment. The same logic applies to Norway in 1940, where timely mobilization and concentrated defenders would have made Germany's surprise invasion far more costly and uncertain.