Would FAR 91.227, or any other regulation, forbid use of ADS-B-out in an unregistered ultralight?
It looks like using ADS-B without any identifier would be contrary to 47 CFR 87.107(a), which requires all aircraft transmitters (with some exceptions, which don't include ADS-B) to include an identification, usually the registration.

§87.107   Station identification.
(a) Aircraft station. Identify by one of the following means:
(1) Aircraft radio station call sign.
(2) The type of aircraft followed by the characters of the
registration marking (“N” number) of the aircraft, omitting the prefix
letter “N.”
[...]
(3) The FAA assigned radiotelephony designator of the aircraft
operating organization followed by the flight identification number.
(4) An aircraft identification approved by the FAA for use by aircraft
stations participating in an organized flying activity of short
duration.

14 CFR 91.227 does allow for a &quot;TSO-C154c self-assigned temporary 24-bit address&quot; rather than the actual N-number but that part doesn't apply to ultralights anyway. It appears to be a reference to 87.107(a)(4) above.
Transponders are exempt from the requirement to broadcast identification, per 47 CFR 87.107(d).
Based on all that, and unless there's an FAA regulation about it (I couldn't find one), I'd say that a transponder is allowed on an ultralight (if you can operate it within the weight limit) but ADS-B is not.