Let $S=\textrm{Spec }R$ where $R$ is a Dedekind domain, let $\mathfrak{p}$ be a maximal ideal of $R$, which is a closed point of $S$, can we find an distinguished open affine subset of $S$, say $\textrm{Spec }A_f$ where $\mathfrak{p}A_f$ is principal?
Note that every ideal of a Dedekind domain has at most 2 generators. Hence I believe that given a maximal ideal $(a,b)$, it's possible to find an element $f$ s.t. $(a,b)A_f$ is principal.
Yes. Since $\mathfrak{p}A_\mathfrak{p}$ is principal, it can be generated by some fraction $\frac{a}{s}$. Letting $b_1,\dots,b_n$ be a finite set of generators for $\mathfrak{p}$, we can write $b_i=\frac{c_i}{s_i}\cdot\frac{a}{s}$. Letting $f=ss_1\dots s_n$, we see that all the elements needed to witness the fact that $\frac{a}{s}$ generates $\mathfrak{p}$ are in $A_f$. Thus $\mathfrak{p}A_f$ is principal.
More generally, this argument shows that if $M$ is a finitely generated module over a commutative ring $A$ and $M_\mathfrak{p}$ can be generated by $n$ elements as an $A_\mathfrak{p}$-module for some $\mathfrak{p}\in\operatorname{Spec} A$, then there exists $f\in A\setminus\mathfrak{p}$ such that $M_f$ is generated by $n$ elements as an $A_f$-module. There are many other similar results of this sort, saying that statements involving localizations at a prime can be lifted to some open neighborhood (given some finiteness condition). The proofs are generally similar: just observe that the condition in question can be witnessed using only finitely many elements of the localization, which have a common denominator.