It's true that the legally married spouse of a military member or veteran can co-sign a VA loan. There is no penalty for doing so; the veteran loan is still fully guaranteed by the VA. Two unmarried military members are also able to co-sign on a VA loan with the same results. When a military member or veteran wants to bring an unrelated, non-military cosigner, the VA allows this with one major exception.
The VA guarantee is limited to the amount of the veteran's interest in the property. Some companies won't allow these types of "mixed" loans, so you may have a bit of shopping around to do before finding a lender willing to work with you. If you find yourself in this position, give yourself plenty of extra time to hunt for the right lender.