Can I replace the knob and tube wiring in the ceiling but not the walls?
It can be and frequently is replaced piecemeal, but I'd certainly be in favor of wholesale replacement if it were my house. 

If we accept "1880s-1930s" as the range of its general use (wikipedia, not any particularly great research effort) it's 80-130 years old. And any impact it's having on your insurance rates won't end until it's all gone. 

Plus, you can insulate the walls, too, once it's gone. And you'll have ground wires.