And David Gerrold has done Trek stuff for both Bantam and Pocket.
That's a special case, because the only thing Gerrold wrote for Pocket was the "Encounter at Farpoint" novelization, and Gerrold was in fact an uncredited co-creator of TNG, one of the original development team along with Roddenberry, D. C. Fontana, and Bob Justman. So it's not quite your typical tie-in author's situation.
So Harlin Ellison doesn't own the Gaurdian of Forever or Matheson the MU with it's various assorted evil logos.
Even if creators did retain ownership, there's no reason Richard Matheson would own the Mirror Universe, since Jerome Bixby created it. (EDIT: Oops, Greg beat me to it.)
And the scriptwriter usually doesn't create the logos; that's the job of the show's art department. The logos would be trademarks of Paramount (or now CBS), most likely.
So if I put that shirt insignia logo thing on my car, is that legal?
You can buy bumper stickers and clothing with various
Star Trek logos on them (for instance, I have a UFP baseball cap), so yes, it's legal to display the show's trademarked logos on your clothing or car. What would be illegal would be to manufacture and sell your own bootleg
Star Trek merchandise.
However, depending on the specific contents of his contract as a freelancer on TOS, Ellison may have the legal right to receive royalties if the Guardian is ever used in a future TV episode or film. That is not the same thing as actually owning the character, however -- think of it as being like how TV actors get royalties every time an episode they're in airs, even if they don't own the character they play.
(A few years ago, Ellison became upset to hear that the Guardian and Edith Keeler appeared in the Crucible novels without his permission, and sued, seeking royalties, arguing that this entitlement to royalties extended to derivative novels. Last I heard, I think CBS settled out of court rather than have the court issue a ruling one way or another. But, again, being entitled to royalties is not the same thing as actually owning the copyright.)
My understanding, for what it's worth, is that his suit against
Crucible wasn't about the use of the characters and concepts so much as it was about the quoting of verbatim dialogue from the episode script. Ellison's suit also covered a Hallmark Guardian ornament that played audio clips from the episode. His argument (if I understand it correctly) was that he was entitled to residuals for the use of excerpts from the script/episode, just as he would be if clips from the episode had been incorporated into a later episode.
These differences in copyright extend to the show itself, too. The Terry Nation Estate (and, before he died, Terry Nation himself) and the BBC co-own the Daleks, and without the Estate's approval, the Daleks can never appear on Doctor Who. That's why, every time they appear, Nation receives a credit in the closing titles.
That's also why the original series had a couple of long gaps where the Daleks didn't appear for years at a time -- because Nation had withdrawn his approval for their use on the show. I think the first time was when he was trying to sell a Dalek series in the US.
(However, weirdly enough, while the Nation Estate co-owns the Daleks themselves along with the BBC, the BBC owns the design for the Daleks exclusively.)
A similar situation exists with the character of K9, the Doctor's robot-dog companion from the '80s, who's also shown up in the revival series and the spinoff
The Sarah Jane Adventures. The character is owned by his creators Bob Baker & Dave Martin, and they licensed the K9 character to Australian TV, which produced a
K9 series in 2009 (and has a second season in development). But they don't own the rights to anything else specific to
Doctor Who, and they don't own the rights to K9's original design, so they had to have the character lose his memory and "regenerate" into a radically altered appearance the moment he first appeared. (However, the original actor, John Leeson, still voices the character in the Australian show.)