the short answer is yes. Your intuition that irrelevant parameters can be removed is correct.
More formally, for continuous variables (without loss of generality):
since you have said that p(x|a,b) is does not actually vary with b, it can go outside the integral:
but the integral of a pdf is always 1:
which is the result you wanted to show. You can do the same thing for p(y|b,a)