Python, 44 39 65 bytes
m should be a binary string, while n an int.
Had to add 26 bytes all because mathcat didn't say that 0's had to be prefixed to the parity bits.
def p(m,n):x=bin(m.count('1')%2**n)[2:];return m+"0"*(n-len(x))+x