Yes, myopia can be inherited and there is a greater than average chance that your children might need glasses, HOWEVER, that is the worst reason I have ever heard of to avoid getting married and having children. Suggest that you should definitely not worry about it.
MJK MD