Just make separate copies from your project file for home and work use.
Data you save will be written to the layer source files, not to the project file.
Once you have finished the homework part, you can take it to work and re-add the bad layers. If you have a difficult styling on layers, you might save it separately and add it too.
Another choice is to wrap a VRT file around the external source.
A sample example for a Geotif raster file, created with gdal_translate
:
<VRTDataset rasterXSize="1656" rasterYSize="846">
<GeoTransform> 2.0005201224994706e+005, 6.2653333397239589e+002, 0.0000000000000000e+000, 6.9906275735481549e+006, 0.0000000000000000e+000,-6.2653333397239589e+002</GeoTransform>
<Metadata>
<MDI key="TIFFTAG_RESOLUTIONUNIT">2 (pixels/inch)</MDI>
<MDI key="TIFFTAG_XRESOLUTION">120</MDI>
<MDI key="TIFFTAG_YRESOLUTION">120</MDI>
</Metadata>
<VRTRasterBand dataType="Byte" band="1">
<ColorInterp>Red</ColorInterp>
<SimpleSource>
<SourceFilename relativeToVRT="1">testtif.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1656" RasterYSize="846" DataType="Byte" BlockXSize="1656" BlockYSize="1" />
<SrcRect xOff="0" yOff="0" xSize="1656" ySize="846" />
<DstRect xOff="0" yOff="0" xSize="1656" ySize="846" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
and a sample for a shapefile:
<OGRVRTDataSource>
<OGRVRTLayer name="testshp">
<SrcDataSource>F:\Karten\vrt\testshp.shp</SrcDataSource>
<SrcLayer>testshp</SrcLayer>
<GeometryType>wkbPolygon</GeometryType>
<LayerSRS>EPSG:31466</LayerSRS>
</OGRVRTLayer>
</OGRVRTDataSource>
When the source files are not present, the raster is displayed as a black square (you might turn the layer to invisible), and the vector layer becomes a non-geometry table, without any error messages. Additional non-vrt layers with source files that are not removed will stay and can be edited. If you reinstall the source files, everything is back to normal, even the changes to the other layers.