Yes, that is fine. All the water in your sump eventually goes into your tank, so putting it in the sump still serves the same purpose. Just don't count on getting anything that lives off of live rock, like scooter blennies or mandarin fish. It really does not matter where your bacteria is, just as long as it is in the same water that goes into your tank.