Assume that the set $A$ does not have simple structures (such as the case that when all elements are odd numbers in $[1,M/2]$ then all sums are even thus there are no solutions, as pointed out by @fedja).

What is the maximum cardinality $n$ of a subset $A$ of $\{1,2,\ldots,M\}$ such that $(A+A) \cap A$ is empty and the set members don't all obey simple diophantine obstructions?

*Remark:* There is related work for the equation $x+y=2z$ if one allows the set $A$ to be a sumset. In this paper by Croot, Ruzsa and Schoen, according to the comment by @Seva in this mathoverflow question the set $B+B$ has a $k-$term AP as soon as $B\subseteq \{1,\ldots,M\}$ has size $|A|>(3M)^{1-1/(k-1)}.$

Taking the converse of this (letting $k=3$) would seem to say in this restricted case of sumsets and the modified equation, the maximum set size is upperbounded by $(3M)^{1/2}.$

The question remains if any of the techniques in the linked paper, and its references including by Bourgain, Green and others can be applied to my problem. I'd appreciate any pointers in this direction.