Yes, you can. There's a whole field of Number Theory known as "modular arithmetic" (which really could be called "remainder arithmetic") that proves all of this kind of arithmetic 'works'.
For example: say the remainder is 5 when x is divided by 7, and the remainder is 6 when y is divided by 7. If we want the remainder when x+y is divided by 7, we can just add those remainders, 5+6 = 11, and take the remainder of that sum by 7, which is 4. If you want the remainder when xy is divided by 7, you can take the product of the remainders, 30, and divide that by 7 to get the answer, 2. And if you want the remainder when, say, x^2 + 10xy + 20 is divided by 7, you can do the same thing: 5^2 + 10*5*6 + 20 = 345, and dividing by 7 we get a remainder of 2 (since 350 - 7 = 343 is a multiple of 7, 345 gives a remainder of 2 when divided by 7).
As you point out, it's crucial that we be dividing by the same number throughout. When that's not the case, the situation is either more complicated, or there'll be nothing you can do, depending on the numbers involved and the question asked.