We analytically compute the effects that a pulsar's mass variation, whatever its physical origin may be, has on the standard Keplerian changes Delta tau(Kep) in the times of arrival of its pulses due to potential test particle companions, and on their orbital dynamics over long time scales. We apply our results to the planetary system of the PSR B1257+12 pulsar, located in the Galaxy at similar to 600 pc from us, to phenomenologically constrain a putative accretion of non-annihilating dark matter on the hosting neutron star. By comparing our prediction for Delta tau((M) over dot/M) to the root-mean-square accuracy of the timing residuals delta(Delta tau) = 3.0 mu s we find for the mass variation rate. (M) over dot/M <= 1.3 x 10(-6) yr(-1). Actually, considerations related to the pulsar's lifetime, of the order of Delta t similar to 0.8Gyr, and to the currently accepted picture of the formation of its planets point toward a tighter constrain on the mass accretion rate, i.e.. (M) over dot/M <= 10(-9) yr(-1). Otherwise, the planets would have formed at about 300-700 au from PSR B1257+12, i.e. too far with respect to the expected extension of 1-2 au of the part of the protoplanetary disk containing the solid constituents from which they likely originated. In fact, an even smaller upper limit, (M) over dot/M <= 10(-11) yr(-1), would likely be more realistic to avoid certain technical inconsistencies with the quality of the fit of the timing data, performed by keeping the standard value M = 1.4M(circle dot) fixed for the neutron star's mass. Anyway, the entire pulsar data set should be re-processed by explicitly modeling the mass variation rate and solving for it. Model-dependent theoretical predictions for the pulsar's mass accretion, in the framework of the mirror matter scenario, yield a mass increment rate of about 10(-16) yr(-1) for a value of the density of mirror matter rho(dm) as large as 10(-17) g cm(-3) = 5.6x10(6) GeV cm(-3). Such a rate corresponds to a fractional mass variation of Delta M/M similar to 10(-7) over the pulsar's lifetime. It would imply a formation of a black hole from the accreted dark matter inner core for values of the dark matter particle's mass m(dm) larger than 3 x 10(3) Gev, which are, thus, excluded since PSR B1257+12 is actually not such a kind of compact object. Instead, by assuming rho(dm) similar to 10(-24) g cm(-3) = 0.56GeV cm(-3), the mass accretion rate would be (M) over dot/M similar to 10(-23) yr(-1), with a fractional mass variation of the order of Delta M/M similar to 10(-14). It rules out m(dm) >= 8 x 10(6) Gev. Extreme values rho(dm) = 1.8 x 10(-13) g cm(-3) = 10(11) GeV cm(-3) for non-annihilating dark matter in central spike may yield the constraint (M) over dot/M <= 10(-11) yr(-1); over Delta t = 0.8Gyr, it rules out m(dm) >= 12Gev.