SANFORD, N. C. — Nakisha Hardy spent the first nine months of her marriage on a remote Army base in Afghanistan, a tour of duty punctuated by sporadic mortar blasts and constant e-mails to her spouse back home.

The strains of that separation lingered even after First Lt. Hardy returned to Fort Bragg in September. So she signed up for a military retreat to help soldiers and their husbands and wives cope with the pressures of deployments and relocations.

But less than 24 hours after arriving at the retreat, she and her spouse were told to leave. The military chaplains who organized the program last month said that the couple was making others uncomfortable. They said they had determined that under federal law the program could serve only heterosexual married couples.

Lieutenant Hardy is a lesbian in a same-sex marriage who had hoped that the repeal of “Don’t Ask, Don’t Tell” in 2011 would allow her to fully participate in military life. But she and many other gay and bisexual service members say they continue to encounter a raft of rules and regulations barring them from receiving benefits and privileges routinely accorded to heterosexual service members.