You're right. Your period may well come back if you gain weight. You said your period stopped for a year after losing weight, so it is likely that you may have been suffering from a condition called hypothalamic amenorrhoea. This is where the part of the brain that controls your menstrual cycle stops working properly due to excessive exercise,weight loss, or stress. However, it is also common for women to stop having their periods if they gain too much weight.
Although your absent periods could just be what I have outlined above, it is definitely worth going to see your doctor if you are worried. It's probably worth going anyway if you've lost a lot of weight recently. The doctor will be able to give you a more definite answer as to why your periods stopped and when they may resume, and it's likely to be something treatable and very common.
Hope this helps!