wait...do you...have to get approval from anyone to do that?
can he just show up nationwide as a D if he feels like it just to fuck with people
It would be borderline impossible to do for the Presidency but it's been common in the past for super popular Governors/Mayors/Senators to have no competition from the other party and thus win both party's nominations by getting written in for the other party primary. Sam Nunn for some reason comes to mind as someone who did this.
When the Republican Party basically did not exist in the South it was often used by Democrats who couldn't win the primary to create a general election matchup. Bernie Sanders does not run as a Democrat but often wins the Democratic nomination for Senate in Vermont. When he was a Representative he sometimes would lose his write-in campaign for the D nomination.
There have also been times in the past at the state level where someone wins a primary the party refuses to back.
would he though?
every election there are a couple laughable randos on the ballot, are they all officially endorsed
Yes, it's impossible to get on enough ballots to win the Presidency without the nomination of one of the four "major" parties, the Republicans, Democrats, Libertarians and Greens. Some states have more lax ballot requirements but generally parties are the only organizations that can muster the signatures to get on the ballot even in those. An independent candidacy could run in a few states with favorable ballot access laws but it would be odd as a protest for the cost.
At lower levels it's more common for cross party endorsements. In New York there's multiple ballot lines. When Bloomberg first ran for Mayor he ran as a Republican to avoid a contested Democratic Primary, then when he ran for re-election he also got the nomination of the Liberal Party which traditionally endorses Democrats or "more left" candidates. (There's an equivalent Conservative Party that once won a Senate seat with William F. Buckley's brother.) Usually when there are cross-party nominations the person isn't listed more than once, but it does happen, New York sometimes merges them and sometimes doesn't.
Trump could have entered all of the Democratic primaries just fine, anyone can do that*, it just costs a lot. Then if we follow out this scenario to having a bunch of GOPers troll the primaries by voting for him in them and say he gets a significant share of the delegates. I have to think the DNC would make the delegates unbound rather than allow them to hold any balance of power at the Convention.
*I know the D's did their whole pledge thing this time but I doubt it would stand up in court to block ballot access. I'm pretty sure those have been shot down in the past.