The discriminant of E/F, or of R[u]/R, is the square of the difference between the two conjugate roots of the quadratic polynomial. Take the square of sqrt(m) - -sqrt(m) and get 4m.
The integral ring S of E/F/R is trapped between the module spanned by 1 and u, and the module spanned by 1/4m and u/4m.
Let x be algebraic over R. Write x as (a+b*sqrt(m))/4m. The conjugate of x satisfies the same monic polynomial. Use these two roots to reverse engineer the polynomial.
The linear coefficient is -a/2m. Thus a is something in R times 2m. This makes a/4m an integer, or a half integer, or an integer divided by some of the factors of 2 if 2 is not itself prime.
Assume R is a ufd, and move to the constant coefficient, (a2-mb2)/16m2. The first term is an integer, or a quarter integer, or something in between. Let g be a prime factor of 2 that survives in the denominator of a/4m. If there are j copies of g in the denominator, then the first term has a valuation of 2j relative to g. The second term, b2/16m, must have the same valuation. The valuation of m must be even, and m is square free, hence g does not divide m. Verify that b consumes 2k-j powers of g, and b/4m has j powers of g in the denominator, just like a/4m. We have a common denominator.
Next assume g does not survive in the denominator of a/4m. b has at least 2k powers of g. If g divides m, then b has at least 2k+1 powers of g. There are no powers of g in the denominator of b/4m.
In summary, an integral element, written as a linear combination of 1 and u, has coefficients that belong to R, or they share a common denominator that is a factor of 2, and in that case the denominator and m are coprime.
These conditions are necessary, but not sufficient for every ufd. This is because a fraction with g2j in the denominator, minus another fraction with g2j in the denominator, is not guaranteed to lie in R. The valuation does not always drop back to 0.
Watch what happens when R = Z. The first fraction has a numerator that is 1 mod 4, and the second fraction has a numerator that is m mod 4, with a common denominator of 4. This works out as long as m is 1 mod 4. The elements of S take the form a+b×sqrt(m), where m is square free, and a and b are integers, or half integers if m = 1 mod 4.
When half integers are involved we don't really have a basis for S as a free Z module. Instead of sqrt(m), let u = (1+sqrt(m))/2. Verify that this spans the integral ring S. Notice that the difference between the conjugates is now sqrt(m), whence the discriminant becomes m.
If S is an integral ring, with a discriminant d0, see if d0 is divisible by 4, and reconstruct m accordingly. Thus d0 determines the quadratic extension of Q and the associated integral ring S over Z.
The discriminant of such an order is l2×d0.
If an element in the integral closure has 2 in the denominator then multiply by g to find something with g in the denominator. Let's see if this works out.
With g in the denominator, the two coefficients upstairs must have opposite parity. Square away, and get 1 or 3 or 1+2i or 3+2i mod 4, which all map to 1 mod 2. To get a difference of 0 mod 2, m is also 1 mod 2. If m is 3i, for example, which is i mod 2, then the extension is already integrally closed, and we cannot supplement by putting g in the denominator.
Let m = 1 mod 2, so that g becomes a valid denominator. What about g2 = 2? For the half integers we must look mod 4. The complex numbers a b and m, reduced mod 4, and equal to 1 mod 2, belong to a group Z2Z2. The value of m determines the ratio of a and b. I'll leave the details to you.