The sentence that should come next to best maintain the compare-and-contrast text structure is:
"However, they don’t take up a lot of space."
This sentence introduces a contrast while still relating back to the previous sentences about rats and dogs being similar in many ways.