There is no single official worldwide volleyball statistics definition. But we can take a look at a representative comprehensive source for definitions of volleyball statistics: 2015 NCAA Official Volleyball Statistics Rules. Their definition of “dig” is the following (in “Section 4—Digs”):
A dig (D) is awarded when a player passes the ball that has been attacked by the opposition. Digs are given only when players receive an attacked ball and it is kept in play, not when a ball is brought up off a “put back” (blocked ball).
Also, it contains the following approved ruling which perfectly answers both your questions:
Team White player No. 1 attacks the ball. The ball goes off Team Blue player No. 1 and (a) is returned to Team White and passed by Team White player No. 2 or (b) goes to Team Blue player No. 2 who keeps the ball in play.
RULING: In (a), Team Blue player No. 1 is not awarded a block nor is Team White player No. 2 awarded a dig. A block is not considered an attack and therefore a player cannot be given a dig off a block attempt. In (b), Team Blue player No. 1 is not awarded a block but team Blue player No. 2 is awarded a dig.
Which means the answer for your first question is no, this is not a dig. And the answer for your second question is yes, this is still a dig, even though the attack was slowed by the block.
Other official bodies or specific competitions might use a different definition, but I believe the basic principles would be the same.