That's not a thing that you can do out of the box. You could write a custom Roslyn analyzer that checks, for example, for an attribute of yours and adds a warning/error, but writing Roslyn analyzers is not trivial. It isn't entirely hard, either, note.
Consider:
// TODO: add an analyzer that checks for this attribute and applies the enforcement
[RestrictAccessTo(nameof(Accessor), nameof(Allowed))]
private string SuperPrivate;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…