The symptoms and the results of your gene testing for HLA B27 seem to have confirmed that you have ankylosing spondylitis. There is no scope for any doubt about the diagnosis.
Under these circumstances, it is strongly recommended that you discuss the full detail about this disease, its impact on life, its impact on the family, short term and long term plan for its treatment, and most importantly, all the do's and don't with your rheumatologist. It usually takes 1-2 hours of a detailed patient education and counselling session to explain all the details. It is extremely important because this is a genetic disease that is part of your body (like diabetes and high blood pressure) that would require life time of treatment including regular physiotherapy exercises, medicines and certain life-style changes.
My reply to your immediate questions are as follows:
1. Having sex is NOT contraindicated in this disease at all.
2. Regarding medicines and pregnancy, it is usually recommended that methotrexate is discontinued for at least 2-3 months before pregnancy sets in.
I suggest that you sit with your rheumatologist and discuss all the issues in great detail.