I'm assuming you need the child object to rotate on the spot, that is, with its own Origin as pivot point? If so ....
Select the object to be constrained, which I'll call a cube from now on, and Shift S, Cursor to selected.
Shift D, and call the new object TemporaryCube.
Create an empty.
Add a Copy Rotation constraint to the Empty with the bone as the target.
Select the Empty first and the Cube second, Control P, Object with Keep Transform.
Add two Child Of constraints to the Cube.
In the first constraint, untick the Rotation and Scale axes. Pick Bone as parent.
Correct the location by pressing Shift S, Selection to Cursor.
In the second constraint untick Location and Scale axes. Pick Empty as target.
Rotate the Cube back to how it should be by:
Selecting a) the Cube, b) the Temporary Cube, then going to Object/Transform/Align to Transform
Orientation. Then you can delete Temporary Cube.
If you want to remove the constraint afterwards ....
Create a cube or sphere or something. With it selected, press Shift and select the object with the constraint. This cube/sphere is going to "hold" the position and rotation data for you.
The cube or whatever needs to be in the same position and rotation as the object with the constraint. You can get it there using Object/Transform/Align Objects, and Object/Transform/Align to Transform Orientation. You'll probably need to select all axes in the tool settings and change Global to Local.
Remove the constraint, then get it back into the position of the "data holder" cube/sphere using the same two align tools as above. Remember that the object you select last when the two objects are selected ready for the align tool, is the object whose data will be copied.