If bicycles are rare, you are still much more likely to be seen and avoided if you are where cars expect a car to be, then if you are where cars expect nothing to be.
Of course, there are still situations where riding in the street - either in a bike lane or taking the lane - is dangerous or otherwise impractical; the question is whether riding on the sidewalk is an improvement, or whether you should be forgoing cycling (perhaps walking your bike).
Of course, there are still situations where riding in the street - either in a bike lane or taking the lane - is dangerous or otherwise impractical; the question is whether riding on the sidewalk is an improvement, or whether you should be forgoing cycling (perhaps walking your bike).