Thailand has warned Myanmar soldiers not to violate its sovereign rights as they are pushed back by rebel groups.