In this work, a system of two ground state atoms confined in a one-dimensional real Rydberg potential was modeled. The atom-atom interaction was considered as a nonlocal separable potential (NLSP) of rank one. This potential was assumed because it leads to an analytical solution of the Lippmann-Schwinger equation. The NLSPs are useful in the few body problems that the many-body potential at each point is replaced by a projective two-body nonlocal potential operator. Analytical expressions for the confined particle resolvent were calculated as a key function in this study. The contributions of the bound and virtual states in the complex energy plane were obtained via the derived transition matrix. Since the low energy quantum scattering problems scattering length is an important quantity, the behavior of this parameter was described versus the reduced energy considering various values of potential parameters. In a one-dimensional model, the total cross section in units of the area is not a meaningful property; however, the reflectance coefficient has a similar role. Therefore the reflectance probability and its behavior were investigated. Then a new confined potential via combining the complex absorbing Scarf II potential with the real Rydberg potential, called the Rydberg-Scarf II potential, was introduced to construct a non-Hermitian Hamiltonian. In order to investigate the effect of the complex potential, the scattering length and reflectance coefficient were calculated. It was concluded that in addition to the competition between the repulsive and attractive parts of both potentials, the imaginary part of the complex potential has an important effect on the properties of the system. The complex potential also reduces the reflectance probability via increasing the absorption probability. For all numerical computations, the parameters of a system including argon gas confined in graphite were considered.