OP, provided that M is greater than any possible value of the positive integer a, the answer you suggest in your comment is correct, namely:
a <= b+My; a >= b+2y; b+y = 1, where y is binary
To confirm, we just have to examine this set of statements to demonstrate that (1) the desired outcomes are feasible and (2) all other outcomes are infeasible. Since b is a binary variable in this case, "all other outcomes" means simply the other outcome: b=0 vs b=1.
Proof
(a = 1) => (b = 1)
To begin, consider the condition:
if a=1 then b=1
Let a=1 in your suggested answer, obtaining:
1 <= b+My; 1 >= b+2y; b+y = 1
Clearly, b=1 is feasible, because we can find a value of y that allows all of the statements to be true (namely, y=0):
1 <= 1+M*0; 1 >= 1+2*0; 1+0 = 1
On the other hand, if we let b=0:
1 <= 0+My; 1 >= 0+2y; 0+y = 1
This implies that y=1, which leads to a contradiction in the second statement:
1 <= 0+M*1; 1 >= 0+2*1; 0+1 = 1
Therefore, if a=1, then it must be that b=1.
(a > 1) => (b = 0)
Next, consider the contrapositive of the prior condition (to satisfy the "else" clause):
if a>1 then b=0
Following the same procedure, let a>1 in your suggested answer - I'll put a 5, but keep in mind that this could be any integer greater than 1:
5 <= b+My; 5 >= b+2y; b+y = 1
We see that b=0 is feasible, because we can find a value of y that makes all of the statements true (namely, y=1):
5 <= 0+M*1; 5 >= 0+2*1; 0+1 = 1
(This is the point at which it is important that M be greater than any possible value of a, otherwise the first statement could be untrue.)
On the other hand, if we let b=1:
5 <= 1+My; 5 >= 1+2y; 1+y = 1
This implies that y=0, which leads to a contradiction in the first inequality:
5 <= 1+M*0; 5 >= 1+2*0; 1+0 = 1
Therefore, if a>1, then it must be that b=0.
Conclusion
Therefore, this set of statements
a <= b+My; a >= b+2y; b+y = 1, where y is binary
satisfies the condition:
if a=1 then b=1 else b=0