By the time you can tell, you can't have a legal abortion. Black market ultrasound is probably not the limiting factor in illegal abortions in Sweden or Finland.
They can't really tell with 100 % accuracy until birth, but by week 18 they can tell with a very high level of accuracy. And Sweden permits abortions until the end of week 18.