Barrier is indeed an Egg move according to the Pokemon XY Guide but it is impossible to test right now.